From 886dd7d28e50c003cc88b81b968d487a3c17b0d7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 2 Jul 2003 01:41:23 +0000 Subject: [PATCH] fixes needed for separate DLL build to work git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/app.h | 28 +++---- include/wx/build.h | 2 +- include/wx/clntdata.h | 6 +- include/wx/cmdline.h | 6 +- include/wx/confbase.h | 11 +-- include/wx/datetime.h | 88 ++++++++++---------- include/wx/datstrm.h | 4 +- include/wx/db.h | 61 +++++++------- include/wx/dbtable.h | 8 +- include/wx/dde.h | 17 ++-- include/wx/debug.h | 28 +++---- include/wx/defs.h | 89 ++++++++++++++++----- include/wx/dialup.h | 2 - include/wx/dir.h | 9 ++- include/wx/dirdlg.h | 1 - include/wx/dynlib.h | 10 +-- include/wx/dynload.h | 10 +-- include/wx/encconv.h | 2 +- include/wx/event.h | 127 +++++++++++++++-------------- include/wx/ffile.h | 2 +- include/wx/file.h | 6 +- include/wx/fileconf.h | 10 +-- include/wx/filefn.h | 82 ++++++++++--------- include/wx/filename.h | 4 +- include/wx/filesys.h | 8 +- include/wx/fontmap.h | 12 +-- include/wx/fs_inet.h | 2 +- include/wx/fs_mem.h | 8 +- include/wx/fs_zip.h | 4 +- include/wx/gdicmn.h | 2 - include/wx/generic/textdlgg.h | 1 - include/wx/hash.h | 8 +- include/wx/hashmap.h | 16 ++-- include/wx/iconloc.h | 12 ++- include/wx/intl.h | 12 +-- include/wx/ipcbase.h | 10 +-- include/wx/list.h | 24 +++--- include/wx/log.h | 82 ++++++++++--------- include/wx/longlong.h | 16 ++-- include/wx/mac/combobox.h | 1 - include/wx/mac/textctrl.h | 1 - include/wx/memory.h | 14 ++-- include/wx/memtext.h | 2 +- include/wx/mimetype.h | 23 +++--- include/wx/module.h | 2 +- include/wx/msgout.h | 10 +-- include/wx/mstream.h | 4 +- include/wx/msw/combobox.h | 2 - include/wx/msw/dde.h | 14 ++-- include/wx/msw/mimetype.h | 4 +- include/wx/msw/private.h | 4 +- include/wx/object.h | 18 ++--- include/wx/process.h | 4 +- include/wx/protocol/ftp.h | 2 +- include/wx/protocol/http.h | 2 +- include/wx/protocol/protocol.h | 6 +- include/wx/regex.h | 6 +- include/wx/sckaddr.h | 8 +- include/wx/sckipc.h | 6 +- include/wx/sckstrm.h | 6 +- include/wx/snglinst.h | 4 +- include/wx/socket.h | 10 +-- include/wx/stopwatch.h | 12 +-- include/wx/strconv.h | 32 ++++---- include/wx/stream.h | 26 +++--- include/wx/string.h | 40 +++++----- include/wx/sysopt.h | 2 +- include/wx/textbuf.h | 2 +- include/wx/textctrl.h | 1 - include/wx/textfile.h | 2 +- include/wx/tokenzr.h | 4 +- include/wx/txtstrm.h | 10 +-- include/wx/url.h | 2 +- include/wx/utils.h | 142 +++++++++++++++++---------------- include/wx/variant.h | 6 +- include/wx/vector.h | 2 +- include/wx/volume.h | 2 +- include/wx/wfstream.h | 12 +-- include/wx/wxchar.h | 114 +++++++++++++------------- include/wx/zipstrm.h | 2 +- include/wx/zstream.h | 4 +- src/common/event.cpp | 17 +++- src/msw/fontutil.cpp | 2 +- src/msw/registry.cpp | 5 +- src/msw/textctrl.cpp | 3 +- src/msw/utils.cpp | 4 +- 86 files changed, 754 insertions(+), 677 deletions(-) diff --git a/include/wx/app.h b/include/wx/app.h index 64bf26e029..6143fd4213 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -26,11 +26,11 @@ #include "wx/build.h" #include "wx/init.h" // we must declare wxEntry() -class WXDLLEXPORT wxApp; -class WXDLLEXPORT wxAppTraits; -class WXDLLEXPORT wxCmdLineParser; -class WXDLLEXPORT wxLog; -class WXDLLEXPORT wxMessageOutput; +class WXDLLEXPORT_CORE wxApp; +class WXDLLEXPORT_BASE wxAppTraits; +class WXDLLEXPORT_BASE wxCmdLineParser; +class WXDLLEXPORT_BASE wxLog; +class WXDLLEXPORT_BASE wxMessageOutput; // ---------------------------------------------------------------------------- // typedefs @@ -57,7 +57,7 @@ enum // VS: Fullscreen/framebuffer application needs to choose display mode prior // to wxWindows initialization. This class holds information about display // mode. It is used by wxApp::Set/GetDisplayMode. -class WXDLLEXPORT wxDisplayModeInfo +class WXDLLEXPORT_CORE wxDisplayModeInfo { public: wxDisplayModeInfo() : m_ok(FALSE) {} @@ -79,7 +79,7 @@ private: // wxAppConsole: wxApp for non-GUI applications // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxAppConsole : public wxEvtHandler +class WXDLLEXPORT_BASE wxAppConsole : public wxEvtHandler { public: // ctor and dtor @@ -302,7 +302,7 @@ protected: #if wxUSE_GUI -class WXDLLEXPORT wxAppBase : public wxAppConsole +class WXDLLEXPORT_CORE wxAppBase : public wxAppConsole { public: wxAppBase(); @@ -503,7 +503,7 @@ protected: #endif #else // !GUI // can't use typedef because wxApp forward declared as a class - class WXDLLEXPORT wxApp : public wxAppConsole + class WXDLLEXPORT_BASE wxApp : public wxAppConsole { }; #endif // GUI/!GUI @@ -516,7 +516,7 @@ protected: // is discouraged, consider using DECLARE_APP() after which you may call // wxGetApp() which will return the object of the correct type (i.e. MyApp and // not wxApp) -WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; +WXDLLEXPORT_DATA_BASE(extern wxApp*) wxTheApp; // ---------------------------------------------------------------------------- // global functions @@ -526,13 +526,13 @@ WXDLLEXPORT_DATA(extern wxApp*) wxTheApp; // ------------------------------------------------------ // Force an exit from main loop -extern void WXDLLEXPORT wxExit(); +extern void WXDLLEXPORT_BASE wxExit(); // Yield to other apps/messages -extern bool WXDLLEXPORT wxYield(); +extern bool WXDLLEXPORT_BASE wxYield(); // Yield to other apps/messages -extern void WXDLLEXPORT wxWakeUpIdle(); +extern void WXDLLEXPORT_BASE wxWakeUpIdle(); // ---------------------------------------------------------------------------- // macros for dynamic creation of the application object @@ -542,7 +542,7 @@ extern void WXDLLEXPORT wxWakeUpIdle(); // creator function. wxApp can then call this function to create a new app // object. Convoluted, but necessary. -class WXDLLEXPORT wxAppInitializer +class WXDLLEXPORT_BASE wxAppInitializer { public: wxAppInitializer(wxAppInitializerFunction fn) diff --git a/include/wx/build.h b/include/wx/build.h index 3d10bdfc53..d9daff79ed 100644 --- a/include/wx/build.h +++ b/include/wx/build.h @@ -14,7 +14,7 @@ #include "wx/version.h" -class WXDLLEXPORT wxAppConsole; +class WXDLLEXPORT_BASE wxAppConsole; // ---------------------------------------------------------------------------- // wxBuildOptions diff --git a/include/wx/clntdata.h b/include/wx/clntdata.h index 1b54507cbe..986375a02b 100644 --- a/include/wx/clntdata.h +++ b/include/wx/clntdata.h @@ -29,14 +29,14 @@ enum wxClientDataType wxClientData_Void // client data is untyped and we don't own it }; -class WXDLLEXPORT wxClientData +class WXDLLEXPORT_BASE wxClientData { public: wxClientData() { } virtual ~wxClientData() { } }; -class WXDLLEXPORT wxStringClientData : public wxClientData +class WXDLLEXPORT_BASE wxStringClientData : public wxClientData { public: wxStringClientData() : m_data() { } @@ -57,7 +57,7 @@ private: // NOTE: This functionality is currently duplicated in wxEvtHandler in order // to avoid having more than one vtable in that class hierarchy. -class WXDLLEXPORT wxClientDataContainer +class WXDLLEXPORT_BASE wxClientDataContainer { public: wxClientDataContainer(); diff --git a/include/wx/cmdline.h b/include/wx/cmdline.h index 5899ddf646..5395fe7a15 100644 --- a/include/wx/cmdline.h +++ b/include/wx/cmdline.h @@ -22,7 +22,7 @@ #if wxUSE_CMDLINE_PARSER -class WXDLLEXPORT wxDateTime; +class WXDLLEXPORT_BASE wxDateTime; // ---------------------------------------------------------------------------- // constants @@ -91,7 +91,7 @@ struct wxCmdLineEntryDesc // 4. use GetXXX() to retrieve the parsed info // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxCmdLineParser +class WXDLLEXPORT_BASE wxCmdLineParser { public: // ctors and initializers @@ -219,7 +219,7 @@ private: // this function is always available (even if !wxUSE_CMDLINE_PARSER) because it // is used by wxWin itself under Windows -class WXDLLEXPORT wxCmdLineParser +class WXDLLEXPORT_BASE wxCmdLineParser { public: static wxArrayString ConvertStringToArgs(const wxChar *cmdline); diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 4414c8e7a9..ec4c35bee4 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -73,7 +73,8 @@ enum // Keys are pairs "key_name = value" where value may be of string or integer // (long) type (TODO doubles and other types such as wxDate coming soon). // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxConfigBase + +class WXDLLEXPORT_BASE wxConfigBase { public: // constants @@ -292,7 +293,7 @@ private: // you work in the entry directory and the path is automatically restored // when the function returns // Taken out of wxConfig since not all compilers can cope with nested classes. -class wxConfigPathChanger +class WXDLLEXPORT_BASE wxConfigPathChanger { public: // ctor/dtor do path changing/restorin @@ -308,7 +309,7 @@ private: m_strOldPath; // saved path bool m_bChanged; // was the path changed? - DECLARE_NO_COPY_CLASS(wxConfigPathChanger) + DECLARE_NO_COPY_CLASS(wxConfigPathChanger) }; @@ -338,12 +339,12 @@ private: '_' only. '$' must be escaped ('\$') in order to be taken literally. */ -WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz); +WXDLLEXPORT_BASE wxString wxExpandEnvVars(const wxString &sz); /* Split path into parts removing '..' in progress */ -WXDLLEXPORT void wxSplitPath(wxArrayString& aParts, const wxChar *sz); +WXDLLEXPORT_BASE void wxSplitPath(wxArrayString& aParts, const wxChar *sz); #endif diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 287655c6e7..6e7a66e87f 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -26,9 +26,9 @@ #include "wx/longlong.h" -class WXDLLEXPORT wxDateTime; -class WXDLLEXPORT wxTimeSpan; -class WXDLLEXPORT wxDateSpan; +class WXDLLEXPORT_BASE wxDateTime; +class WXDLLEXPORT_BASE wxTimeSpan; +class WXDLLEXPORT_BASE wxDateSpan; // a hack: don't use inline functions in debug builds - we don't care about // performances and this only leads to increased rebuild time (because every @@ -117,16 +117,16 @@ class WXDLLEXPORT wxDateSpan; // argument for arguments of type wxDateTime; it is also returned by all // functions returning wxDateTime on failure (this is why it is also called // wxInvalidDateTime) -class WXDLLEXPORT wxDateTime; +class WXDLLEXPORT_BASE wxDateTime; -WXDLLEXPORT_DATA(extern const wxDateTime) wxDefaultDateTime; +extern WXDLLEXPORT_DATA_BASE(const wxDateTime) wxDefaultDateTime; #define wxInvalidDateTime wxDefaultDateTime // ---------------------------------------------------------------------------- // wxDateTime represents an absolute moment in the time // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDateTime +class WXDLLEXPORT_BASE wxDateTime { public: // types @@ -398,7 +398,7 @@ public: // a class representing a time zone: basicly, this is just an offset // (in seconds) from GMT - class WXDLLEXPORT TimeZone + class WXDLLEXPORT_BASE TimeZone { public: TimeZone(TZ tz); @@ -418,7 +418,7 @@ public: // NB: this struct should always be kept normalized (i.e. mon should // be < 12, 1 <= day <= 31 &c), so use AddMonths(), AddDays() // instead of modifying the member fields directly! - struct WXDLLEXPORT Tm + struct WXDLLEXPORT_BASE Tm { wxDateTime_t msec, sec, min, hour, mday; Month mon; @@ -1005,7 +1005,7 @@ private: // objects of that class. See also wxDateSpan. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTimeSpan +class WXDLLEXPORT_BASE wxTimeSpan { public: // constructors @@ -1185,7 +1185,7 @@ private: // associated with those. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDateSpan +class WXDLLEXPORT_BASE wxDateSpan { public: // constructors @@ -1298,11 +1298,11 @@ WX_DECLARE_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray); // virtual methods to work with the holidays they correspond to. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDateTimeHolidayAuthority; +class WXDLLEXPORT_BASE wxDateTimeHolidayAuthority; WX_DEFINE_EXPORTED_ARRAY(wxDateTimeHolidayAuthority *, wxHolidayAuthoritiesArray); class wxDateTimeHolidaysModule; -class WXDLLEXPORT wxDateTimeHolidayAuthority +class WXDLLEXPORT_BASE wxDateTimeHolidayAuthority { friend class wxDateTimeHolidaysModule; public: @@ -1347,7 +1347,7 @@ private: }; // the holidays for this class are all Saturdays and Sundays -class WXDLLEXPORT wxDateTimeWorkDays : public wxDateTimeHolidayAuthority +class WXDLLEXPORT_BASE wxDateTimeWorkDays : public wxDateTimeHolidayAuthority { protected: virtual bool DoIsHoliday(const wxDateTime& dt) const; @@ -1388,31 +1388,31 @@ protected: // no need to check for validity - the member functions we call will do it -inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, +inline wxDateTime WXDLLEXPORT_BASE operator+(const wxDateTime& dt, const wxTimeSpan& ts) { return dt.Add(ts); } -inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, +inline wxDateTime WXDLLEXPORT_BASE operator-(const wxDateTime& dt, const wxTimeSpan& ts) { return dt.Subtract(ts); } -inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, +inline wxDateTime WXDLLEXPORT_BASE operator+(const wxDateTime& dt, const wxDateSpan& ds) { return dt.Add(ds); } -inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, +inline wxDateTime WXDLLEXPORT_BASE operator-(const wxDateTime& dt, const wxDateSpan& ds) { return dt.Subtract(ds); } -inline wxTimeSpan WXDLLEXPORT operator-(const wxDateTime& dt1, +inline wxTimeSpan WXDLLEXPORT_BASE operator-(const wxDateTime& dt1, const wxDateTime& dt2) { return dt1.Subtract(dt2); @@ -1421,42 +1421,42 @@ inline wxTimeSpan WXDLLEXPORT operator-(const wxDateTime& dt1, // comparison // ---------- -inline bool WXDLLEXPORT operator<(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator<(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); return t1.GetValue() < t2.GetValue(); } -inline bool WXDLLEXPORT operator<=(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator<=(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); return t1.GetValue() <= t2.GetValue(); } -inline bool WXDLLEXPORT operator>(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator>(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); return t1.GetValue() > t2.GetValue(); } -inline bool WXDLLEXPORT operator>=(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator>=(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); return t1.GetValue() >= t2.GetValue(); } -inline bool WXDLLEXPORT operator==(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator==(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); return t1.GetValue() == t2.GetValue(); } -inline bool WXDLLEXPORT operator!=(const wxDateTime& t1, const wxDateTime& t2) +inline bool WXDLLEXPORT_BASE operator!=(const wxDateTime& t1, const wxDateTime& t2) { wxASSERT_MSG( t1.IsValid() && t2.IsValid(), _T("invalid wxDateTime") ); @@ -1470,24 +1470,24 @@ inline bool WXDLLEXPORT operator!=(const wxDateTime& t1, const wxDateTime& t2) // arithmetics // ----------- -inline wxTimeSpan WXDLLEXPORT operator+(const wxTimeSpan& ts1, +inline wxTimeSpan WXDLLEXPORT_BASE operator+(const wxTimeSpan& ts1, const wxTimeSpan& ts2) { return wxTimeSpan(ts1.GetValue() + ts2.GetValue()); } -inline wxTimeSpan WXDLLEXPORT operator-(const wxTimeSpan& ts1, +inline wxTimeSpan WXDLLEXPORT_BASE operator-(const wxTimeSpan& ts1, const wxTimeSpan& ts2) { return wxTimeSpan(ts1.GetValue() - ts2.GetValue()); } -inline wxTimeSpan WXDLLEXPORT operator*(const wxTimeSpan& ts, int n) +inline wxTimeSpan WXDLLEXPORT_BASE operator*(const wxTimeSpan& ts, int n) { return wxTimeSpan(ts).Multiply(n); } -inline wxTimeSpan WXDLLEXPORT operator*(int n, const wxTimeSpan& ts) +inline wxTimeSpan WXDLLEXPORT_BASE operator*(int n, const wxTimeSpan& ts) { return wxTimeSpan(ts).Multiply(n); } @@ -1495,32 +1495,32 @@ inline wxTimeSpan WXDLLEXPORT operator*(int n, const wxTimeSpan& ts) // comparison // ---------- -inline bool WXDLLEXPORT operator<(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator<(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() < t2.GetValue(); } -inline bool WXDLLEXPORT operator<=(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator<=(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() <= t2.GetValue(); } -inline bool WXDLLEXPORT operator>(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator>(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() > t2.GetValue(); } -inline bool WXDLLEXPORT operator>=(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator>=(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() >= t2.GetValue(); } -inline bool WXDLLEXPORT operator==(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator==(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() == t2.GetValue(); } -inline bool WXDLLEXPORT operator!=(const wxTimeSpan &t1, const wxTimeSpan &t2) +inline bool WXDLLEXPORT_BASE operator!=(const wxTimeSpan &t1, const wxTimeSpan &t2) { return t1.GetValue() != t2.GetValue(); } @@ -1533,7 +1533,7 @@ inline bool WXDLLEXPORT operator!=(const wxTimeSpan &t1, const wxTimeSpan &t2) // ---------- // ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2 -inline WXDLLEXPORT bool operator==(const wxDateSpan& ds1, +inline WXDLLEXPORT_BASE bool operator==(const wxDateSpan& ds1, const wxDateSpan& ds2) { return ds1.GetYears() == ds2.GetYears() && @@ -1541,7 +1541,7 @@ inline WXDLLEXPORT bool operator==(const wxDateSpan& ds1, ds1.GetTotalDays() == ds2.GetTotalDays(); } -inline WXDLLEXPORT bool operator!=(const wxDateSpan& ds1, +inline WXDLLEXPORT_BASE bool operator!=(const wxDateSpan& ds1, const wxDateSpan& ds2) { return !(ds1 == ds2); @@ -1550,7 +1550,7 @@ inline WXDLLEXPORT bool operator!=(const wxDateSpan& ds1, // arithmetics // ----------- -inline WXDLLEXPORT wxDateSpan operator+(const wxDateSpan& ds1, +inline WXDLLEXPORT_BASE wxDateSpan operator+(const wxDateSpan& ds1, const wxDateSpan& ds2) { return wxDateSpan(ds1.GetYears() + ds2.GetYears(), @@ -1559,7 +1559,7 @@ inline WXDLLEXPORT wxDateSpan operator+(const wxDateSpan& ds1, ds1.GetDays() + ds2.GetDays()); } -inline WXDLLEXPORT wxDateSpan operator-(const wxDateSpan& ds1, +inline WXDLLEXPORT_BASE wxDateSpan operator-(const wxDateSpan& ds1, const wxDateSpan& ds2) { return wxDateSpan(ds1.GetYears() - ds2.GetYears(), @@ -1568,12 +1568,12 @@ inline WXDLLEXPORT wxDateSpan operator-(const wxDateSpan& ds1, ds1.GetDays() - ds2.GetDays()); } -inline WXDLLEXPORT wxDateSpan operator*(const wxDateSpan& ds, int n) +inline WXDLLEXPORT_BASE wxDateSpan operator*(const wxDateSpan& ds, int n) { return wxDateSpan(ds).Multiply(n); } -inline WXDLLEXPORT wxDateSpan operator*(int n, const wxDateSpan& ds) +inline WXDLLEXPORT_BASE wxDateSpan operator*(int n, const wxDateSpan& ds) { return wxDateSpan(ds).Multiply(n); } @@ -1588,7 +1588,7 @@ inline WXDLLEXPORT wxDateSpan operator*(int n, const wxDateSpan& ds) // for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) ) // ---------------------------------------------------------------------------- -inline WXDLLEXPORT void wxNextMonth(wxDateTime::Month& m) +inline WXDLLEXPORT_BASE void wxNextMonth(wxDateTime::Month& m) { wxASSERT_MSG( m < wxDateTime::Inv_Month, _T("invalid month") ); @@ -1596,7 +1596,7 @@ inline WXDLLEXPORT void wxNextMonth(wxDateTime::Month& m) m = (wxDateTime::Month)(m + 1); } -inline WXDLLEXPORT void wxPrevMonth(wxDateTime::Month& m) +inline WXDLLEXPORT_BASE void wxPrevMonth(wxDateTime::Month& m) { wxASSERT_MSG( m < wxDateTime::Inv_Month, _T("invalid month") ); @@ -1604,7 +1604,7 @@ inline WXDLLEXPORT void wxPrevMonth(wxDateTime::Month& m) : (wxDateTime::Month)(m - 1); } -inline WXDLLEXPORT void wxNextWDay(wxDateTime::WeekDay& wd) +inline WXDLLEXPORT_BASE void wxNextWDay(wxDateTime::WeekDay& wd) { wxASSERT_MSG( wd < wxDateTime::Inv_WeekDay, _T("invalid week day") ); @@ -1612,7 +1612,7 @@ inline WXDLLEXPORT void wxNextWDay(wxDateTime::WeekDay& wd) wd = (wxDateTime::WeekDay)(wd + 1); } -inline WXDLLEXPORT void wxPrevWDay(wxDateTime::WeekDay& wd) +inline WXDLLEXPORT_BASE void wxPrevWDay(wxDateTime::WeekDay& wd) { wxASSERT_MSG( wd < wxDateTime::Inv_WeekDay, _T("invalid week day") ); diff --git a/include/wx/datstrm.h b/include/wx/datstrm.h index 00e35884d7..ebe6a9e9ce 100644 --- a/include/wx/datstrm.h +++ b/include/wx/datstrm.h @@ -22,7 +22,7 @@ #if wxUSE_STREAMS -class WXDLLEXPORT wxDataInputStream +class WXDLLEXPORT_BASE wxDataInputStream { public: #if wxUSE_UNICODE @@ -64,7 +64,7 @@ protected: DECLARE_NO_COPY_CLASS(wxDataInputStream) }; -class WXDLLEXPORT wxDataOutputStream +class WXDLLEXPORT_BASE wxDataOutputStream { public: #if wxUSE_UNICODE diff --git a/include/wx/db.h b/include/wx/db.h index 8cd409a0ce..dfe2ca17b6 100644 --- a/include/wx/db.h +++ b/include/wx/db.h @@ -123,8 +123,8 @@ enum enumDummy {enumDum1}; */ const int wxDB_PATH_MAX = 254; -WXDLLEXPORT_DATA(extern wxChar const *) SQL_LOG_FILENAME; -WXDLLEXPORT_DATA(extern wxChar const *) SQL_CATALOG_FILENAME; +WXDLLEXPORT_DATA_BASE(extern wxChar const *) SQL_LOG_FILENAME; +WXDLLEXPORT_DATA_BASE(extern wxChar const *) SQL_CATALOG_FILENAME; // Database Globals const int DB_TYPE_NAME_LEN = 40; @@ -269,7 +269,7 @@ enum wxODBC_ERRORS #define SQL_MAX_AUTHSTR_LEN MAXNAME #endif -class WXDLLEXPORT wxDbConnectInf +class WXDLLEXPORT_BASE wxDbConnectInf { private: bool freeHenvOnDestroy; @@ -331,7 +331,7 @@ class WXDLLEXPORT wxDbConnectInf }; // class wxDbConnectInf -struct WXDLLEXPORT wxDbSqlTypeInfo +struct WXDLLEXPORT_BASE wxDbSqlTypeInfo { wxString TypeName; SWORD FsqlType; @@ -342,7 +342,7 @@ struct WXDLLEXPORT wxDbSqlTypeInfo }; -class WXDLLEXPORT wxDbColFor +class WXDLLEXPORT_BASE wxDbColFor { public: wxString s_Field; // Formated String for Output @@ -361,7 +361,7 @@ public: }; -class WXDLLEXPORT wxDbColInf +class WXDLLEXPORT_BASE wxDbColInf { public: wxChar catalog[128+1]; @@ -391,7 +391,7 @@ public: }; -class WXDLLEXPORT wxDbTableInf // Description of a Table +class WXDLLEXPORT_BASE wxDbTableInf // Description of a Table { public: wxChar tableName[DB_MAX_TABLE_NAME_LEN+1]; @@ -407,7 +407,7 @@ public: }; -class WXDLLEXPORT wxDbInf // Description of a Database +class WXDLLEXPORT_BASE wxDbInf // Description of a Database { public: wxChar catalog[128+1]; @@ -459,10 +459,11 @@ enum wxDBMS // will overwrite the errors of the previously destroyed wxDb object in // this variable. -WXDLLEXPORT_DATA(extern wxChar) DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; +WXDLLEXPORT_DATA_BASE(extern wxChar) + DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN]; -class WXDLLEXPORT wxDb +class WXDLLEXPORT_BASE wxDb { private: bool dbIsOpen; @@ -701,22 +702,24 @@ class wxTablesInUse : public wxObject // The following routines allow a user to get new database connections, free them // for other code segments to use, or close all of them when the application has // completed. -wxDb WXDLLEXPORT *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); -bool WXDLLEXPORT wxDbFreeConnection(wxDb *pDb); -void WXDLLEXPORT wxDbCloseConnections(void); -int WXDLLEXPORT wxDbConnectionsInUse(void); +wxDb WXDLLEXPORT_BASE *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); +bool WXDLLEXPORT_BASE wxDbFreeConnection(wxDb *pDb); +void WXDLLEXPORT_BASE wxDbCloseConnections(void); +int WXDLLEXPORT_BASE wxDbConnectionsInUse(void); // Writes a message to the wxLog window (stdout usually) when an internal error // situation occurs. This function only works in DEBUG builds -const wxChar* WXDLLEXPORT wxDbLogExtendedErrorMsg(const wxChar *userText, - wxDb *pDb, - const wxChar *ErrFile, - int ErrLine); +const wxChar* WXDLLEXPORT_BASE +wxDbLogExtendedErrorMsg(const wxChar *userText, + wxDb *pDb, + const wxChar *ErrFile, + int ErrLine); // This function sets the sql log state for all open wxDb objects -bool WXDLLEXPORT wxDbSqlLog(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME); +bool WXDLLEXPORT_BASE +wxDbSqlLog(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME); #if 0 @@ -729,8 +732,9 @@ int WXDLLEXPORT wxDbCreateDataSource(const wxString &driverName, const wxString // for a list of available datasources. Call this routine // the first time using SQL_FETCH_FIRST. Continue to call it // using SQL_FETCH_NEXT until you've exhausted the list. -bool WXDLLEXPORT wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMax, wxChar *DsDesc, - SWORD DsDescMax, UWORD direction = SQL_FETCH_NEXT); +bool WXDLLEXPORT_BASE +wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMax, wxChar *DsDesc, + SWORD DsDescMax, UWORD direction = SQL_FETCH_NEXT); // Change this to 0 to remove use of all deprecated functions @@ -761,15 +765,18 @@ typedef wxTablesInUse CstructTablesInUse; #endif // Deprecated function names that are replaced by the function names listed above -wxDB WXDLLEXPORT *GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); -bool WXDLLEXPORT FreeDbConnection(wxDB *pDb); -void WXDLLEXPORT CloseDbConnections(void); -int WXDLLEXPORT NumberDbConnectionsInUse(void); +wxDB WXDLLEXPORT_BASE +*GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS); +bool WXDLLEXPORT_BASE FreeDbConnection(wxDB *pDb); +void WXDLLEXPORT_BASE CloseDbConnections(void); +int WXDLLEXPORT_BASE NumberDbConnectionsInUse(void); bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME); -bool WXDLLEXPORT GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, - UWORD direction = SQL_FETCH_NEXT); +bool WXDLLEXPORT_BASE +GetDataSource(HENV henv, char *Dsn, SWORD DsnMax, char *DsDesc, SWORD DsDescMax, + UWORD direction = SQL_FETCH_NEXT); + #endif // Deprecated structures/classes/functions #endif // _WX_DB_H_ diff --git a/include/wx/dbtable.h b/include/wx/dbtable.h index a005b30afc..95d4fb9379 100644 --- a/include/wx/dbtable.h +++ b/include/wx/dbtable.h @@ -56,7 +56,7 @@ const int wxDB_NO_MORE_COLUMN_NUMBERS = -1; // wxDbTable class which allows it to create a table in the data // source, exchange data between the data source and the C++ // object, and so on. -class WXDLLEXPORT wxDbColDef +class WXDLLEXPORT_BASE wxDbColDef { public: wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name @@ -77,7 +77,7 @@ public: }; // wxDbColDef -class WXDLLEXPORT wxDbColDataPtr +class WXDLLEXPORT_BASE wxDbColDataPtr { public: void *PtrDataObj; @@ -87,7 +87,7 @@ public: // This structure is used when creating secondary indexes. -class WXDLLEXPORT wxDbIdxDef +class WXDLLEXPORT_BASE wxDbIdxDef { public: wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; @@ -95,7 +95,7 @@ public: }; // wxDbIdxDef -class WXDLLEXPORT wxDbTable +class WXDLLEXPORT_BASE wxDbTable { private: ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors diff --git a/include/wx/dde.h b/include/wx/dde.h index a1fc0644f0..dcecc27ddc 100644 --- a/include/wx/dde.h +++ b/include/wx/dde.h @@ -7,21 +7,20 @@ class wxDDEClient; class wxDDEServer; class wxDDEConnection; -WX_DECLARE_EXPORTED_LIST(wxDDEClient, wxDDEClientList); -WX_DECLARE_EXPORTED_LIST(wxDDEServer, wxDDEServerList); -WX_DECLARE_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList); - +WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLEXPORT_BASE); +WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLEXPORT_BASE); +WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLEXPORT_BASE); #if defined(__WXMSW__) -#include "wx/msw/dde.h" + #include "wx/msw/dde.h" #elif defined(__WXMOTIF__) -#include "wx/motif/dde.h" + #include "wx/motif/dde.h" #elif defined(__WXGTK__) -#include "wx/gtk/dde.h" + #include "wx/gtk/dde.h" #elif defined(__WXMAC__) -#include "wx/mac/dde.h" + #include "wx/mac/dde.h" #elif defined(__WXPM__) -#include "wx/os2/dde.h" + #include "wx/os2/dde.h" #endif #endif diff --git a/include/wx/debug.h b/include/wx/debug.h index 01ad0ebdd4..787b7966d0 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -78,25 +78,25 @@ szFile and nLine - file name and line number of the ASSERT szMsg - optional message explaining the reason */ - extern void WXDLLEXPORT wxOnAssert(const wxChar *szFile, - int nLine, - const wxChar *szCond, - const wxChar *szMsg = NULL); + extern void WXDLLEXPORT_BASE wxOnAssert(const wxChar *szFile, + int nLine, + const wxChar *szCond, + const wxChar *szMsg = NULL); // call this function to break into the debugger unconditionally (assuming // the program is running under debugger, of course) - extern void WXDLLEXPORT wxTrap(); + extern void WXDLLEXPORT_BASE wxTrap(); // helper function used to implement wxASSERT and wxASSERT_MSG // // note using "int" and not "bool" for cond to avoid VC++ warnings about // implicit conversions when doing "wxAssert( pointer )" and also use of // "!!cond" below to ensure that everything is converted to int - extern void WXDLLEXPORT wxAssert(int cond, - const wxChar *szFile, - int nLine, - const wxChar *szCond, - const wxChar *szMsg = NULL) ; + extern void WXDLLEXPORT_BASE wxAssert(int cond, + const wxChar *szFile, + int nLine, + const wxChar *szCond, + const wxChar *szMsg = NULL) ; // generic assert macro #define wxASSERT(cond) wxAssert(!!(cond), __TFILE__, __LINE__, _T(#cond)) @@ -112,7 +112,7 @@ // // NB: this is made obsolete by wxCOMPILE_TIME_ASSERT() and shouldn't be // used any longer - extern bool WXDLLEXPORT wxAssertIsEqual(int x, int y); + extern bool WXDLLEXPORT_BASE wxAssertIsEqual(int x, int y); #else #define wxTrap() @@ -124,7 +124,7 @@ // Use of wxFalse instead of FALSE suppresses compiler warnings about testing // constant expression -WXDLLEXPORT_DATA(extern const bool) wxFalse; +WXDLLEXPORT_DATA_BASE(extern const bool) wxFalse; #define wxAssertFailure wxFalse // special form of assert: always triggers it (in debug mode) @@ -227,9 +227,9 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse; // currently this only really works under Mac in CodeWarrior builds, it always // returns false otherwise #ifdef __WXMAC__ - extern bool WXDLLEXPORT wxIsDebuggerRunning(); + extern bool WXDLLEXPORT_BASE wxIsDebuggerRunning(); #else // !Mac - inline bool WXDLLEXPORT wxIsDebuggerRunning() { return false; } + inline bool wxIsDebuggerRunning() { return false; } #endif // Mac/!Mac #endif // _WX_DEBUG_H_ diff --git a/include/wx/defs.h b/include/wx/defs.h index 108d1e2d50..4c4f972f2d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -24,16 +24,25 @@ // Make sure the environment is set correctly #if defined(__WXMSW__) && defined(__X__) -#error "Target can't be both X and Windows" + #error "Target can't be both X and Windows" #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__WXCOCOA__) && \ !defined(__X__) && !defined(__WXMGL__) && !defined(__WXX11__) && \ wxUSE_GUI -#ifdef __UNIX__ -#error "No Target! You should use wx-config program for compilation flags!" -#else // !Unix -#error "No Target! You should use supplied makefiles for compilation!" -#endif // Unix/!Unix + #ifdef __UNIX__ + #error "No Target! You should use wx-config program for compilation flags!" + #else // !Unix + #error "No Target! You should use supplied makefiles for compilation!" + #endif // Unix/!Unix +#endif + +#ifndef __WXWINDOWS__ + #define __WXWINDOWS__ 1 +#endif + +#ifndef wxUSE_BASE + // by default consider that this is a monolithic build + #define wxUSE_BASE 1 #endif #if !wxUSE_GUI && !defined(__WXBASE__) @@ -349,25 +358,59 @@ typedef int wxWindowID; #define WXIMPORT #endif -// WXDLLEXPORT maps to export declaration when building the DLL, to import -// declaration if using it or to nothing at all if we don't use wxWin DLL +/* + We support building wxWindows as a set of several libraries but we don't + support arbitrary combinations of libs/DLLs: either we build all of them as + DLLs (in which case WXMAKINGDLL is defined) or none (it isn't). + + However we have a problem because we need separate WXDLLEXPORT versions for + different libraries as, for example, wxString class should be dllexported + when compiled in wxBase and dllimported otherwise, so we do define separate + WXMAKING/USINGDLL_XYZ constants for each component XYZ. + */ #ifdef WXMAKINGDLL - #define WXDLLEXPORT WXEXPORT - #define WXDLLEXPORT_DATA(type) WXEXPORT type - #define WXDLLEXPORT_CTORFN -#elif defined(WXUSINGDLL) - #define WXDLLEXPORT WXIMPORT - #define WXDLLEXPORT_DATA(type) WXIMPORT type - #define WXDLLEXPORT_CTORFN + #if wxUSE_BASE + #define WXMAKINGDLL_BASE + #else + #define WXUSINGDLL_BASE + #endif + + #define WXMAKINGDLL_CORE +#endif // WXMAKINGDLL + +#ifdef WXUSINGDLL + #define WXUSINGDLL_BASE + #define WXUSINGDLL_CORE +#endif // WXUSINGDLL + + +// WXDLLEXPORT maps to export declaration when building the DLL, to import +// declaration if using it or to nothing at all if we don't use wxWin as DLL +#ifdef WXMAKINGDLL_BASE + #define WXDLLEXPORT_BASE WXEXPORT + #define WXDLLEXPORT_DATA_BASE(type) WXEXPORT type +#elif defined(WXUSINGDLL_BASE) + #define WXDLLEXPORT_BASE WXIMPORT + #define WXDLLEXPORT_DATA_BASE(type) WXIMPORT type #else // not making nor using DLL - #define WXDLLEXPORT - #define WXDLLEXPORT_DATA(type) type - #define WXDLLEXPORT_CTORFN + #define WXDLLEXPORT_BASE + #define WXDLLEXPORT_DATA_BASE(type) type #endif -// symbolic constant used by all Find()-like functions returning positive -// integer on success as failure indicator -#define wxNOT_FOUND (-1) +#ifdef WXMAKINGDLL_CORE + #define WXDLLEXPORT_CORE WXEXPORT + #define WXDLLEXPORT_DATA_CORE(type) WXEXPORT type +#elif defined(WXUSINGDLL_CORE) + #define WXDLLEXPORT_CORE WXIMPORT + #define WXDLLEXPORT_DATA_CORE(type) WXIMPORT type +#else // not making nor using DLL + #define WXDLLEXPORT_CORE + #define WXDLLEXPORT_DATA_CORE(type) type +#endif + +// for backwards compatibility, define suffix-less versions too +#define WXDLLEXPORT WXDLLEXPORT_CORE +#define WXDLLEXPORT_DATA WXDLLEXPORT_DATA_CORE // ---------------------------------------------------------------------------- // Very common macros @@ -440,6 +483,10 @@ typedef int wxWindowID; // size of statically declared array #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) +// symbolic constant used by all Find()-like functions returning positive +// integer on success as failure indicator +#define wxNOT_FOUND (-1) + // ---------------------------------------------------------------------------- // compiler specific settings // ---------------------------------------------------------------------------- diff --git a/include/wx/dialup.h b/include/wx/dialup.h index fdd9d55fd8..b877c6b369 100644 --- a/include/wx/dialup.h +++ b/include/wx/dialup.h @@ -26,8 +26,6 @@ class WXDLLEXPORT wxArrayString; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - #define WXDIALUP_MANAGER_DEFAULT_BEACONHOST wxT("www.yahoo.com") // ---------------------------------------------------------------------------- diff --git a/include/wx/dir.h b/include/wx/dir.h index e0b69e7ea3..317ad78593 100644 --- a/include/wx/dir.h +++ b/include/wx/dir.h @@ -49,7 +49,7 @@ enum wxDirTraverseResult // wxDirTraverser: helper class for wxDir::Traverse() // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDirTraverser +class WXDLLEXPORT_BASE wxDirTraverser { public: // called for each file found by wxDir::Traverse() @@ -79,9 +79,9 @@ public: // wxDir: portable equivalent of {open/read/close}dir functions // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDirData; +class WXDLLEXPORT_BASE wxDirData; -class WXDLLEXPORT wxDir +class WXDLLEXPORT_BASE wxDir { public: // test for existence of a directory with the given name @@ -141,7 +141,7 @@ public: int flags = wxDIR_DEFAULT); private: - friend class WXDLLEXPORT wxDirData; + friend class wxDirData; wxDirData *m_data; @@ -149,3 +149,4 @@ private: }; #endif // _WX_DIR_H_ + diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index b9c598362c..738b1013cf 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -12,7 +12,6 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogNameStr; WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr; WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #define wxDD_DEFAULT_STYLE \ (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON) diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 4f4d571856..5e7efb7d86 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -76,7 +76,7 @@ DLLs and the resolving of symbols in them. There are no instances of this class, it simply serves as a namespace for its static member functions. */ -class WXDLLEXPORT wxDllLoader +class WXDLLEXPORT_BASE wxDllLoader { public: /* @@ -130,7 +130,7 @@ private: // wxDynamicLibrary - friendly interface to wxDllLoader // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDynamicLibrary +class WXDLLEXPORT_BASE wxDynamicLibrary { public: // ctors @@ -185,7 +185,7 @@ private: // wxLibrary // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLibrary : public wxObject +class WXDLLEXPORT_BASE wxLibrary : public wxObject { public: wxLibrary(wxDllType handle); @@ -210,7 +210,7 @@ public: // wxLibraries // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLibraries +class WXDLLEXPORT_BASE wxLibraries { public: wxLibraries(); @@ -229,7 +229,7 @@ protected: // Global variables // ---------------------------------------------------------------------------- -extern WXDLLEXPORT_DATA(wxLibraries) wxTheLibraries; +extern WXDLLEXPORT_DATA_BASE(wxLibraries) wxTheLibraries; // ---------------------------------------------------------------------------- // Interesting defines diff --git a/include/wx/dynload.h b/include/wx/dynload.h index 145ec568a5..fffa3067a7 100644 --- a/include/wx/dynload.h +++ b/include/wx/dynload.h @@ -38,7 +38,7 @@ #include "wx/msw/private.h" #endif -class WXDLLEXPORT wxPluginLibrary; +class WXDLLEXPORT_BASE wxPluginLibrary; WX_DECLARE_EXPORTED_STRING_HASH_MAP(wxPluginLibrary *, wxDLManifest); typedef wxDLManifest wxDLImports; @@ -98,7 +98,7 @@ enum wxDLFlags }; -class WXDLLEXPORT wxDynamicLibrary +class WXDLLEXPORT_BASE wxDynamicLibrary { public: @@ -188,7 +188,7 @@ protected: // instantiate this class directly anyway, use wxPluginManager // instead. -class WXDLLEXPORT wxPluginLibrary : public wxDynamicLibrary +class WXDLLEXPORT_BASE wxPluginLibrary : public wxDynamicLibrary { public: @@ -242,7 +242,7 @@ private: }; -class WXDLLEXPORT wxPluginManager +class WXDLLEXPORT_BASE wxPluginManager { public: @@ -308,7 +308,7 @@ private: // serves as a namespace for its static member functions. #if WXWIN_COMPATIBILITY_2_2 -class WXDLLEXPORT wxDllLoader +class WXDLLEXPORT_BASE wxDllLoader { public: diff --git a/include/wx/encconv.h b/include/wx/encconv.h index 71b4812e79..fb9e7df22b 100644 --- a/include/wx/encconv.h +++ b/include/wx/encconv.h @@ -55,7 +55,7 @@ WX_DEFINE_ARRAY_INT(wxFontEncoding, wxFontEncodingArray); // 8bit encodings/charsets. It can also convert from/to Unicode //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxEncodingConverter : public wxObject +class WXDLLEXPORT_BASE wxEncodingConverter : public wxObject { public: diff --git a/include/wx/event.h b/include/wx/event.h index b94fcb8c9f..5209d9cb9a 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -31,12 +31,12 @@ // forward declarations // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxList; +class WXDLLEXPORT_BASE wxList; #if wxUSE_GUI - class WXDLLEXPORT wxDC; - class WXDLLEXPORT wxMenu; - class WXDLLEXPORT wxWindow; + class WXDLLEXPORT_CORE wxDC; + class WXDLLEXPORT_CORE wxMenu; + class WXDLLEXPORT_CORE wxWindow; #endif // wxUSE_GUI // ---------------------------------------------------------------------------- @@ -75,6 +75,8 @@ typedef int wxEventType; #define END_DECLARE_EVENT_TYPES() }; #define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value, #define DECLARE_LOCAL_EVENT_TYPE(name, value) name = wxEVT_USER_FIRST + value, +#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \ + DECLARE_LOCAL_EVENT_TYPE(name, value) #define DEFINE_EVENT_TYPE(name) #define DEFINE_LOCAL_EVENT_TYPE(name) @@ -86,15 +88,17 @@ typedef int wxEventType; #define BEGIN_DECLARE_EVENT_TYPES() #define END_DECLARE_EVENT_TYPES() +#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \ + extern expdecl const wxEventType name; #define DECLARE_EVENT_TYPE(name, value) \ - extern const wxEventType WXDLLEXPORT name; -#define DECLARE_LOCAL_EVENT_TYPE(name, value) extern const wxEventType name; -#define DECLARE_EXPORTED_LOCAL_EVENT_TYPE(usergoo, name, value) extern const wxEventType usergoo name; + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_CORE, name, value) +#define DECLARE_LOCAL_EVENT_TYPE(name, value) \ + DECLARE_EXPORTED_EVENT_TYPE(/* */, name, value) #define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); -#define DEFINE_LOCAL_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); +#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name) // generate a new unique event type -extern WXDLLEXPORT wxEventType wxNewEventType(); +extern WXDLLEXPORT_BASE wxEventType wxNewEventType(); #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES @@ -107,9 +111,9 @@ BEGIN_DECLARE_EVENT_TYPES() #else // !WXWIN_COMPATIBILITY_EVENT_TYPES // it is important to still have these as constants to avoid // initialization order related problems - DECLARE_EVENT_TYPE(wxEVT_NULL, 0) - DECLARE_EVENT_TYPE(wxEVT_FIRST, 10000) - DECLARE_EVENT_TYPE(wxEVT_USER_FIRST, wxEVT_FIRST + 2000) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_BASE, wxEVT_NULL, 0) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_BASE, wxEVT_FIRST, 10000) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_BASE, wxEVT_USER_FIRST, wxEVT_FIRST + 2000) #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES DECLARE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED, 1) @@ -141,7 +145,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED, 18) // Sockets and timers send events, too - DECLARE_EVENT_TYPE(wxEVT_SOCKET, 50) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_BASE, wxEVT_SOCKET, 50) DECLARE_EVENT_TYPE(wxEVT_TIMER , 80) // Mouse event types @@ -245,7 +249,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_MEASURE_ITEM, 436) DECLARE_EVENT_TYPE(wxEVT_COMPARE_ITEM, 437) DECLARE_EVENT_TYPE(wxEVT_INIT_DIALOG, 438) - DECLARE_EVENT_TYPE(wxEVT_IDLE, 439) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLEXPORT_BASE, wxEVT_IDLE, 439) DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440) DECLARE_EVENT_TYPE(wxEVT_SIZING, 441) DECLARE_EVENT_TYPE(wxEVT_MOVING, 4442) @@ -278,7 +282,7 @@ END_DECLARE_EVENT_TYPES() // // still, any new code using it should include wx/textctrl.h explicitly #if !WXWIN_COMPATIBILITY_EVENT_TYPES - extern const wxEventType WXDLLEXPORT wxEVT_COMMAND_TEXT_UPDATED; + extern const wxEventType WXDLLEXPORT_CORE wxEVT_COMMAND_TEXT_UPDATED; #endif #if WXWIN_COMPATIBILITY @@ -337,7 +341,7 @@ END_DECLARE_EVENT_TYPES() * */ -class WXDLLEXPORT wxEvent : public wxObject +class WXDLLEXPORT_BASE wxEvent : public wxObject { private: wxEvent& operator=(const wxEvent&); @@ -407,7 +411,7 @@ private: wxEVT_COMMAND_TOGGLEBUTTON_CLICKED */ -class WXDLLEXPORT wxCommandEvent : public wxEvent +class WXDLLEXPORT_CORE wxCommandEvent : public wxEvent { private: wxCommandEvent& operator=(const wxCommandEvent& event); @@ -470,7 +474,7 @@ private: // this class adds a possibility to react (from the user) code to a control // notification: allow or veto the operation being reported. -class WXDLLEXPORT wxNotifyEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxNotifyEvent : public wxCommandEvent { public: wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) @@ -513,7 +517,7 @@ private: wxEVT_SCROLL_ENDSCROLL */ -class WXDLLEXPORT wxScrollEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxScrollEvent : public wxCommandEvent { public: wxScrollEvent(wxEventType commandType = wxEVT_NULL, @@ -543,7 +547,7 @@ private: wxEVT_SCROLLWIN_THUMBRELEASE */ -class WXDLLEXPORT wxScrollWinEvent : public wxEvent +class WXDLLEXPORT_CORE wxScrollWinEvent : public wxEvent { public: wxScrollWinEvent(wxEventType commandType = wxEVT_NULL, @@ -606,7 +610,7 @@ enum wxMOUSE_BTN_RIGHT = 2 }; -class WXDLLEXPORT wxMouseEvent : public wxEvent +class WXDLLEXPORT_CORE wxMouseEvent : public wxEvent { public: wxMouseEvent(wxEventType mouseType = wxEVT_NULL); @@ -776,7 +780,7 @@ private: wxEVT_SET_CURSOR */ -class WXDLLEXPORT wxSetCursorEvent : public wxEvent +class WXDLLEXPORT_CORE wxSetCursorEvent : public wxEvent { public: wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0) @@ -817,7 +821,7 @@ private: wxEVT_KEY_UP */ -class WXDLLEXPORT wxKeyEvent : public wxEvent +class WXDLLEXPORT_CORE wxKeyEvent : public wxEvent { public: wxKeyEvent(wxEventType keyType = wxEVT_NULL); @@ -923,7 +927,7 @@ private: wxEVT_SIZE */ -class WXDLLEXPORT wxSizeEvent : public wxEvent +class WXDLLEXPORT_CORE wxSizeEvent : public wxEvent { public: wxSizeEvent() : wxEvent(0, wxEVT_SIZE) @@ -960,7 +964,7 @@ private: wxEVT_MOVE */ -class WXDLLEXPORT wxMoveEvent : public wxEvent +class WXDLLEXPORT_CORE wxMoveEvent : public wxEvent { public: wxMoveEvent() @@ -1000,10 +1004,10 @@ private: #if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__)) // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined - extern WXDLLEXPORT int g_isPainting; + extern WXDLLEXPORT_CORE int g_isPainting; #endif // debug -class WXDLLEXPORT wxPaintEvent : public wxEvent +class WXDLLEXPORT_CORE wxPaintEvent : public wxEvent { public: wxPaintEvent(int Id = 0) @@ -1028,7 +1032,7 @@ private: DECLARE_DYNAMIC_CLASS(wxPaintEvent) }; -class WXDLLEXPORT wxNcPaintEvent : public wxEvent +class WXDLLEXPORT_CORE wxNcPaintEvent : public wxEvent { public: wxNcPaintEvent(int winid = 0) @@ -1046,7 +1050,7 @@ private: wxEVT_ERASE_BACKGROUND */ -class WXDLLEXPORT wxEraseEvent : public wxEvent +class WXDLLEXPORT_CORE wxEraseEvent : public wxEvent { private: wxEraseEvent& operator=(const wxEraseEvent& event); @@ -1078,7 +1082,7 @@ private: wxEVT_KILL_FOCUS */ -class WXDLLEXPORT wxFocusEvent : public wxEvent +class WXDLLEXPORT_CORE wxFocusEvent : public wxEvent { private: wxFocusEvent& operator=(const wxFocusEvent& event); @@ -1109,7 +1113,7 @@ private: // wxChildFocusEvent notifies the parent that a child has got the focus: unlike // wxFocusEvent it is propgated upwards the window chain -class WXDLLEXPORT wxChildFocusEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxChildFocusEvent : public wxCommandEvent { public: wxChildFocusEvent(wxWindow *win = NULL); @@ -1128,7 +1132,7 @@ private: wxEVT_ACTIVATE_APP */ -class WXDLLEXPORT wxActivateEvent : public wxEvent +class WXDLLEXPORT_CORE wxActivateEvent : public wxEvent { public: wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = TRUE, int Id = 0) @@ -1154,7 +1158,7 @@ private: wxEVT_INIT_DIALOG */ -class WXDLLEXPORT wxInitDialogEvent : public wxEvent +class WXDLLEXPORT_CORE wxInitDialogEvent : public wxEvent { public: wxInitDialogEvent(int Id = 0) @@ -1174,7 +1178,7 @@ private: wxEVT_MENU_HIGHLIGHT, */ -class WXDLLEXPORT wxMenuEvent : public wxEvent +class WXDLLEXPORT_CORE wxMenuEvent : public wxEvent { public: wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0) @@ -1205,7 +1209,7 @@ private: wxEVT_QUERY_END_SESSION */ -class WXDLLEXPORT wxCloseEvent : public wxEvent +class WXDLLEXPORT_CORE wxCloseEvent : public wxEvent { public: wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0) @@ -1272,7 +1276,7 @@ private: wxEVT_SHOW */ -class WXDLLEXPORT wxShowEvent : public wxEvent +class WXDLLEXPORT_CORE wxShowEvent : public wxEvent { public: wxShowEvent(int winid = 0, bool show = FALSE) @@ -1298,7 +1302,7 @@ private: wxEVT_ICONIZE */ -class WXDLLEXPORT wxIconizeEvent : public wxEvent +class WXDLLEXPORT_CORE wxIconizeEvent : public wxEvent { public: wxIconizeEvent(int winid = 0, bool iconized = TRUE) @@ -1323,7 +1327,7 @@ private: wxEVT_MAXIMIZE */ -class WXDLLEXPORT wxMaximizeEvent : public wxEvent +class WXDLLEXPORT_CORE wxMaximizeEvent : public wxEvent { public: wxMaximizeEvent(int winid = 0) @@ -1361,7 +1365,7 @@ enum wxJOY_BUTTON4 = 8 }; -class WXDLLEXPORT wxJoystickEvent : public wxEvent +class WXDLLEXPORT_CORE wxJoystickEvent : public wxEvent { public: wxPoint m_pos; @@ -1439,7 +1443,7 @@ private: wxEVT_DROP_FILES */ -class WXDLLEXPORT wxDropFilesEvent : public wxEvent +class WXDLLEXPORT_CORE wxDropFilesEvent : public wxEvent { private: wxDropFilesEvent& operator=(const wxDropFilesEvent& event); @@ -1492,7 +1496,7 @@ private: wxEVT_UPDATE_UI */ -class WXDLLEXPORT wxUpdateUIEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxUpdateUIEvent : public wxCommandEvent { public: wxUpdateUIEvent(wxWindowID commandId = 0) @@ -1544,7 +1548,7 @@ private: */ // TODO: shouldn't all events record the window ID? -class WXDLLEXPORT wxSysColourChangedEvent : public wxEvent +class WXDLLEXPORT_CORE wxSysColourChangedEvent : public wxEvent { public: wxSysColourChangedEvent() @@ -1563,7 +1567,7 @@ private: (even if it released the capture itself). */ -class WXDLLEXPORT wxMouseCaptureChangedEvent : public wxEvent +class WXDLLEXPORT_CORE wxMouseCaptureChangedEvent : public wxEvent { private: wxMouseCaptureChangedEvent operator=(const wxMouseCaptureChangedEvent& event); @@ -1591,7 +1595,7 @@ private: /* wxEVT_DISPLAY_CHANGED */ -class WXDLLEXPORT wxDisplayChangedEvent : public wxEvent +class WXDLLEXPORT_CORE wxDisplayChangedEvent : public wxEvent { private: DECLARE_DYNAMIC_CLASS(wxDisplayChangedEvent) @@ -1608,7 +1612,7 @@ public: wxEVT_PALETTE_CHANGED */ -class WXDLLEXPORT wxPaletteChangedEvent : public wxEvent +class WXDLLEXPORT_CORE wxPaletteChangedEvent : public wxEvent { private: wxPaletteChangedEvent& operator=(const wxPaletteChangedEvent& event); @@ -1641,7 +1645,7 @@ private: Indicates the window is getting keyboard focus and should re-do its palette. */ -class WXDLLEXPORT wxQueryNewPaletteEvent : public wxEvent +class WXDLLEXPORT_CORE wxQueryNewPaletteEvent : public wxEvent { public: wxQueryNewPaletteEvent(wxWindowID winid = 0) @@ -1671,7 +1675,7 @@ private: wxEVT_NAVIGATION_KEY */ // NB: don't derive from command event to avoid being propagated to the parent -class WXDLLEXPORT wxNavigationKeyEvent : public wxEvent +class WXDLLEXPORT_CORE wxNavigationKeyEvent : public wxEvent { private: wxNavigationKeyEvent& operator=(const wxNavigationKeyEvent& event); @@ -1742,7 +1746,7 @@ private: wxEVT_DESTROY */ -class WXDLLEXPORT wxWindowCreateEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxWindowCreateEvent : public wxCommandEvent { public: wxWindowCreateEvent(wxWindow *win = NULL); @@ -1755,7 +1759,7 @@ private: DECLARE_DYNAMIC_CLASS(wxWindowCreateEvent) }; -class WXDLLEXPORT wxWindowDestroyEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxWindowDestroyEvent : public wxCommandEvent { public: wxWindowDestroyEvent(wxWindow *win = NULL); @@ -1774,7 +1778,7 @@ private: wxEVT_DETAILED_HELP */ -class WXDLLEXPORT wxHelpEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxHelpEvent : public wxCommandEvent { public: wxHelpEvent(wxEventType type = wxEVT_NULL, @@ -1821,7 +1825,7 @@ private: wxEVT_CONTEXT_MENU */ -class WXDLLEXPORT wxContextMenuEvent : public wxCommandEvent +class WXDLLEXPORT_CORE wxContextMenuEvent : public wxCommandEvent { public: wxContextMenuEvent(wxEventType type = wxEVT_NULL, @@ -1853,7 +1857,7 @@ private: wxEVT_IDLE */ -class WXDLLEXPORT wxIdleEvent : public wxEvent +class WXDLLEXPORT_CORE wxIdleEvent : public wxEvent { public: wxIdleEvent() @@ -1902,7 +1906,7 @@ typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); // we have to keep both versions #if WXWIN_COMPATIBILITY_EVENT_TYPES -struct WXDLLEXPORT wxEventTableEntry +struct WXDLLEXPORT_BASE wxEventTableEntry { // For some reason, this can't be wxEventType, or VC++ complains. int m_eventType; // main event type @@ -1918,7 +1922,7 @@ struct WXDLLEXPORT wxEventTableEntry // struct containing the members common to static and dynamic event tables // entries -struct WXDLLEXPORT wxEventTableEntryBase +struct WXDLLEXPORT_BASE wxEventTableEntryBase { private: wxEventTableEntryBase& operator=(const wxEventTableEntryBase& event); @@ -1952,7 +1956,7 @@ public: }; // an entry from a static event table -struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase +struct WXDLLEXPORT_BASE wxEventTableEntry : public wxEventTableEntryBase { wxEventTableEntry(const int& evType, int winid, int idLast, wxObjectEventFunction fn, wxObject *data) @@ -1969,10 +1973,10 @@ struct WXDLLEXPORT wxEventTableEntry : public wxEventTableEntryBase const int& m_eventType; }; -class WXDLLEXPORT wxEvtHandler; +class WXDLLEXPORT_BASE wxEvtHandler; // an entry used in dynamic event table managed by wxEvtHandler::Connect() -struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase +struct WXDLLEXPORT_BASE wxDynamicEventTableEntry : public wxEventTableEntryBase { wxDynamicEventTableEntry(int evType, int winid, int idLast, wxObjectEventFunction fn, wxObject *data, wxEvtHandler* eventSink) @@ -1997,7 +2001,8 @@ struct WXDLLEXPORT wxDynamicEventTableEntry : public wxEventTableEntryBase // ---------------------------------------------------------------------------- // wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0} // ---------------------------------------------------------------------------- -struct WXDLLEXPORT wxEventTable + +struct WXDLLEXPORT_BASE wxEventTable { const wxEventTable *baseTable; // base event table (next in chain) const wxEventTableEntry *entries; // bottom of entry array @@ -2007,7 +2012,7 @@ struct WXDLLEXPORT wxEventTable // wxEvtHandler: the base class for all objects handling wxWindows events // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxEvtHandler : public wxObject +class WXDLLEXPORT_BASE wxEvtHandler : public wxObject { public: wxEvtHandler(); @@ -2471,9 +2476,9 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC // for pending event processing - notice that there is intentionally no // WXDLLEXPORT here -extern wxList *wxPendingEvents; +extern WXDLLEXPORT_BASE wxList *wxPendingEvents; #if wxUSE_THREADS - extern wxCriticalSection *wxPendingEventsLocker; + extern WXDLLEXPORT_BASE wxCriticalSection *wxPendingEventsLocker; #endif // ---------------------------------------------------------------------------- diff --git a/include/wx/ffile.h b/include/wx/ffile.h index 33f0725af7..a5eaed1060 100644 --- a/include/wx/ffile.h +++ b/include/wx/ffile.h @@ -34,7 +34,7 @@ // dtor which is _not_ virtual, so it shouldn't be used as a base class. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFFile +class WXDLLEXPORT_BASE wxFFile { public: // ctors diff --git a/include/wx/file.h b/include/wx/file.h index 6c8b2a470d..fd0b7021e3 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -53,7 +53,8 @@ // NB: for space efficiency this class has no virtual functions, including // dtor which is _not_ virtual, so it shouldn't be used as a base class. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFile + +class WXDLLEXPORT_BASE wxFile { public: // more file constants @@ -148,7 +149,8 @@ private: // file (and close this one) or call Discard() to cancel the modification. If // you call neither of them, dtor will call Discard(). // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTempFile + +class WXDLLEXPORT_BASE wxTempFile { public: // ctors diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h index 8ac261c3b0..d68c2ef5f5 100644 --- a/include/wx/fileconf.h +++ b/include/wx/fileconf.h @@ -92,12 +92,12 @@ (it's on by default, the current status can be retrieved with IsExpandingEnvVars function). */ -class WXDLLEXPORT wxFileConfigGroup; -class WXDLLEXPORT wxFileConfigEntry; -class WXDLLEXPORT wxFileConfigLineList; -class WXDLLEXPORT wxInputStream; +class WXDLLEXPORT_BASE wxFileConfigGroup; +class WXDLLEXPORT_BASE wxFileConfigEntry; +class WXDLLEXPORT_BASE wxFileConfigLineList; +class WXDLLEXPORT_BASE wxInputStream; -class WXDLLEXPORT wxFileConfig : public wxConfigBase +class WXDLLEXPORT_BASE wxFileConfig : public wxConfigBase { public: // construct the "standard" full name for global (system-wide) and diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 9fb223cde2..9b0bbfeda7 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -66,8 +66,6 @@ enum wxSeekMode wxFromEnd }; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - // ---------------------------------------------------------------------------- // declare our versions of low level file functions: some compilers prepend // underscores to the usual names, some also have Unicode versions of them @@ -156,9 +154,9 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #if defined(__MWERKS__) && defined(macintosh) #include #endif -WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf ); -WXDLLEXPORT int wxAccess( const wxChar *pathname, int mode ); -WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode ); +WXDLLEXPORT_BASE int wxStat( const wxChar *file_name, wxStructStat *buf ); +WXDLLEXPORT_BASE int wxAccess( const wxChar *pathname, int mode ); +WXDLLEXPORT_BASE int wxOpen( const wxChar *pathname, int flags, mode_t mode ); #else #define wxOpen open #define wxStat stat @@ -170,98 +168,98 @@ WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode ); // ---------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------- -WXDLLEXPORT bool wxFileExists(const wxString& filename); +WXDLLEXPORT_BASE bool wxFileExists(const wxString& filename); // does the path exist? (may have or not '/' or '\\' at the end) -WXDLLEXPORT bool wxPathExists(const wxChar *pszPathName); +WXDLLEXPORT_BASE bool wxPathExists(const wxChar *pszPathName); -WXDLLEXPORT bool wxIsAbsolutePath(const wxString& filename); +WXDLLEXPORT_BASE bool wxIsAbsolutePath(const wxString& filename); // Get filename -WXDLLEXPORT wxChar* wxFileNameFromPath(wxChar *path); -WXDLLEXPORT wxString wxFileNameFromPath(const wxString& path); +WXDLLEXPORT_BASE wxChar* wxFileNameFromPath(wxChar *path); +WXDLLEXPORT_BASE wxString wxFileNameFromPath(const wxString& path); // Get directory -WXDLLEXPORT wxString wxPathOnly(const wxString& path); +WXDLLEXPORT_BASE wxString wxPathOnly(const wxString& path); // wxString version -WXDLLEXPORT wxString wxRealPath(const wxString& path); +WXDLLEXPORT_BASE wxString wxRealPath(const wxString& path); -WXDLLEXPORT void wxDos2UnixFilename(wxChar *s); +WXDLLEXPORT_BASE void wxDos2UnixFilename(wxChar *s); -WXDLLEXPORT void wxUnix2DosFilename(wxChar *s); +WXDLLEXPORT_BASE void wxUnix2DosFilename(wxChar *s); // Strip the extension, in situ -WXDLLEXPORT void wxStripExtension(wxChar *buffer); -WXDLLEXPORT void wxStripExtension(wxString& buffer); +WXDLLEXPORT_BASE void wxStripExtension(wxChar *buffer); +WXDLLEXPORT_BASE void wxStripExtension(wxString& buffer); // Get a temporary filename -WXDLLEXPORT wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL); -WXDLLEXPORT bool wxGetTempFileName(const wxString& prefix, wxString& buf); +WXDLLEXPORT_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL); +WXDLLEXPORT_BASE bool wxGetTempFileName(const wxString& prefix, wxString& buf); // Expand file name (~/ and ${OPENWINHOME}/ stuff) -WXDLLEXPORT wxChar* wxExpandPath(wxChar *dest, const wxChar *path); -WXDLLEXPORT bool wxExpandPath(wxString& dest, const wxChar *path); +WXDLLEXPORT_BASE wxChar* wxExpandPath(wxChar *dest, const wxChar *path); +WXDLLEXPORT_BASE bool wxExpandPath(wxString& dest, const wxChar *path); // Contract w.r.t environment ( -> ${OPENWINHOME}/lib) // and make (if under the home tree) relative to home // [caller must copy-- volatile] -WXDLLEXPORT wxChar* wxContractPath(const wxString& filename, +WXDLLEXPORT_BASE wxChar* wxContractPath(const wxString& filename, const wxString& envname = wxEmptyString, const wxString& user = wxEmptyString); // Destructive removal of /./ and /../ stuff -WXDLLEXPORT wxChar* wxRealPath(wxChar *path); +WXDLLEXPORT_BASE wxChar* wxRealPath(wxChar *path); // Allocate a copy of the full absolute path -WXDLLEXPORT wxChar* wxCopyAbsolutePath(const wxString& path); +WXDLLEXPORT_BASE wxChar* wxCopyAbsolutePath(const wxString& path); // Get first file name matching given wild card. // Flags are reserved for future use. #define wxFILE 1 #define wxDIR 2 -WXDLLEXPORT wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE); -WXDLLEXPORT wxString wxFindNextFile(); +WXDLLEXPORT_BASE wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE); +WXDLLEXPORT_BASE wxString wxFindNextFile(); // Does the pattern contain wildcards? -WXDLLEXPORT bool wxIsWild(const wxString& pattern); +WXDLLEXPORT_BASE bool wxIsWild(const wxString& pattern); // Does the pattern match the text (usually a filename)? // If dot_special is TRUE, doesn't match * against . (eliminating // `hidden' dot files) -WXDLLEXPORT bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = TRUE); +WXDLLEXPORT_BASE bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = TRUE); // Concatenate two files to form third -WXDLLEXPORT bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3); +WXDLLEXPORT_BASE bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3); // Copy file1 to file2 -WXDLLEXPORT bool wxCopyFile(const wxString& file1, const wxString& file2, +WXDLLEXPORT_BASE bool wxCopyFile(const wxString& file1, const wxString& file2, bool overwrite = TRUE); // Remove file -WXDLLEXPORT bool wxRemoveFile(const wxString& file); +WXDLLEXPORT_BASE bool wxRemoveFile(const wxString& file); // Rename file -WXDLLEXPORT bool wxRenameFile(const wxString& file1, const wxString& file2); +WXDLLEXPORT_BASE bool wxRenameFile(const wxString& file1, const wxString& file2); // Get current working directory. // If buf is NULL, allocates space using new, else // copies into buf. // IMPORTANT NOTE getcwd is know not to work under some releases // of Win32s 1.3, according to MS release notes! -WXDLLEXPORT wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000); +WXDLLEXPORT_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000); // new and preferred version of wxGetWorkingDirectory // NB: can't have the same name because of overloading ambiguity -WXDLLEXPORT wxString wxGetCwd(); +WXDLLEXPORT_BASE wxString wxGetCwd(); // Set working directory -WXDLLEXPORT bool wxSetWorkingDirectory(const wxString& d); +WXDLLEXPORT_BASE bool wxSetWorkingDirectory(const wxString& d); // Make directory -WXDLLEXPORT bool wxMkdir(const wxString& dir, int perm = 0777); +WXDLLEXPORT_BASE bool wxMkdir(const wxString& dir, int perm = 0777); // Remove directory. Flags reserved for future use. -WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0); +WXDLLEXPORT_BASE bool wxRmdir(const wxString& dir, int flags = 0); // compatibility defines, don't use in new code #define wxDirExists wxPathExists @@ -335,31 +333,31 @@ inline bool wxIsPathSeparator(wxChar c) } // does the string ends with path separator? -WXDLLEXPORT bool wxEndsWithPathSeparator(const wxChar *pszFileName); +WXDLLEXPORT_BASE bool wxEndsWithPathSeparator(const wxChar *pszFileName); // split the full path into path (including drive for DOS), name and extension // (understands both '/' and '\\') -WXDLLEXPORT void wxSplitPath(const wxChar *pszFileName, +WXDLLEXPORT_BASE void wxSplitPath(const wxChar *pszFileName, wxString *pstrPath, wxString *pstrName, wxString *pstrExt); // find a file in a list of directories, returns false if not found -WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile); +WXDLLEXPORT_BASE bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile); // Get the OS directory if appropriate (such as the Windows directory). // On non-Windows platform, probably just return the empty string. -WXDLLEXPORT wxString wxGetOSDirectory(); +WXDLLEXPORT_BASE wxString wxGetOSDirectory(); // Get file modification time -WXDLLEXPORT time_t wxFileModificationTime(const wxString& filename); +WXDLLEXPORT_BASE time_t wxFileModificationTime(const wxString& filename); // ---------------------------------------------------------------------------- // classes // ---------------------------------------------------------------------------- // Path searching -class WXDLLEXPORT wxPathList : public wxStringList +class WXDLLEXPORT_BASE wxPathList : public wxStringList { public: // Adds all paths in environment variable diff --git a/include/wx/filename.h b/include/wx/filename.h index e8a87042b8..9cbe521617 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -38,7 +38,7 @@ #include "wx/filefn.h" #include "wx/datetime.h" -class WXDLLEXPORT wxFile; +class WXDLLEXPORT_BASE wxFile; // ---------------------------------------------------------------------------- // constants @@ -90,7 +90,7 @@ enum // wxFileName: encapsulates a file path // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileName +class WXDLLEXPORT_BASE wxFileName { public: // constructors and assignment diff --git a/include/wx/filesys.h b/include/wx/filesys.h index bf548d2c38..f0df0e24d6 100644 --- a/include/wx/filesys.h +++ b/include/wx/filesys.h @@ -42,7 +42,7 @@ class wxFileSystem; // (in 'index.htm#chapter2', 'chapter2' is anchor) //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxFSFile : public wxObject +class WXDLLEXPORT_BASE wxFSFile : public wxObject { public: wxFSFile(wxInputStream *stream, const wxString& loc, @@ -103,7 +103,7 @@ private: // kinds of files (HTPP, FTP, local, tar.gz etc..) //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxFileSystemHandler : public wxObject +class WXDLLEXPORT_BASE wxFileSystemHandler : public wxObject { public: wxFileSystemHandler() : wxObject() {} @@ -157,7 +157,7 @@ protected: // kinds of files (HTPP, FTP, local, tar.gz etc..) //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxFileSystem : public wxObject +class WXDLLEXPORT_BASE wxFileSystem : public wxObject { public: wxFileSystem() : wxObject() {m_Path = m_LastName = wxEmptyString; m_Handlers.DeleteContents(TRUE); m_FindFileHandler = NULL;} @@ -241,7 +241,7 @@ special characters : */ -class WXDLLEXPORT wxLocalFSHandler : public wxFileSystemHandler +class WXDLLEXPORT_BASE wxLocalFSHandler : public wxFileSystemHandler { public: virtual bool CanOpen(const wxString& location); diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index f8b613308c..fd6f79d62c 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -25,13 +25,13 @@ #endif // wxUSE_GUI #if wxUSE_CONFIG - class WXDLLEXPORT wxConfigBase; + class WXDLLEXPORT_BASE wxConfigBase; #endif // wxUSE_CONFIG -class WXDLLEXPORT wxFontMapper; +class WXDLLEXPORT_BASE wxFontMapper; #if wxUSE_GUI - class WXDLLEXPORT wxWindow; + class WXDLLEXPORT_CORE wxWindow; #endif // wxUSE_GUI // ============================================================================ @@ -47,7 +47,7 @@ class WXDLLEXPORT wxFontMapper; // in knowledge of the encodings equivalence // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFontMapperBase +class WXDLLEXPORT_BASE wxFontMapperBase { public: // constructtor and such @@ -167,7 +167,7 @@ private: #if wxUSE_GUI -class WXDLLEXPORT wxFontMapper : public wxFontMapperBase +class WXDLLEXPORT_CORE wxFontMapper : public wxFontMapperBase { public: // default ctor @@ -240,7 +240,7 @@ private: #else // !wxUSE_GUI -class WXDLLEXPORT wxFontMapper : public wxFontMapperBase +class WXDLLEXPORT_BASE wxFontMapper : public wxFontMapperBase { }; diff --git a/include/wx/fs_inet.h b/include/wx/fs_inet.h index 16ef297579..846d8accff 100644 --- a/include/wx/fs_inet.h +++ b/include/wx/fs_inet.h @@ -39,7 +39,7 @@ limitation) // wxInternetFSHandler //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxInternetFSHandler : public wxFileSystemHandler +class WXDLLEXPORT_BASE wxInternetFSHandler : public wxFileSystemHandler { private: wxHashTable m_Cache; diff --git a/include/wx/fs_mem.h b/include/wx/fs_mem.h index 9309d39b96..455a78fe1f 100644 --- a/include/wx/fs_mem.h +++ b/include/wx/fs_mem.h @@ -23,14 +23,16 @@ #include "wx/filesys.h" -class WXDLLEXPORT wxBitmap; -class WXDLLEXPORT wxImage; +#if wxUSE_GUI + class WXDLLEXPORT_CORE wxBitmap; + class WXDLLEXPORT_CORE wxImage; +#endif // wxUSE_GUI //-------------------------------------------------------------------------------- // wxMemoryFSHandler //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxMemoryFSHandlerBase : public wxFileSystemHandler +class WXDLLEXPORT_BASE wxMemoryFSHandlerBase : public wxFileSystemHandler { public: wxMemoryFSHandlerBase(); diff --git a/include/wx/fs_zip.h b/include/wx/fs_zip.h index 5f4dc0b883..33bf95155d 100644 --- a/include/wx/fs_zip.h +++ b/include/wx/fs_zip.h @@ -24,13 +24,13 @@ #include "wx/filesys.h" -class WXDLLEXPORT wxHashTableLong; +class WXDLLEXPORT_BASE wxHashTableLong; //-------------------------------------------------------------------------------- // wxZipFSHandler //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxZipFSHandler : public wxFileSystemHandler +class WXDLLEXPORT_BASE wxZipFSHandler : public wxFileSystemHandler { public: wxZipFSHandler(); diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 2df4124c47..e8c1c9e186 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -401,8 +401,6 @@ public: wxBrush *FindOrCreateBrush(const wxColour& colour, int style); }; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - class WXDLLEXPORT wxFontList : public wxList { DECLARE_DYNAMIC_CLASS(wxFontList) diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h index a5d0000d47..9c2284ac28 100644 --- a/include/wx/generic/textdlgg.h +++ b/include/wx/generic/textdlgg.h @@ -28,7 +28,6 @@ class WXDLLEXPORT wxTextCtrl; WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; #define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE | wxWS_EX_VALIDATE_RECURSIVELY) diff --git a/include/wx/hash.h b/include/wx/hash.h index 9340538569..905544a4bd 100644 --- a/include/wx/hash.h +++ b/include/wx/hash.h @@ -34,7 +34,7 @@ // pointers to objects // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxHashTableBase : public wxObject +class WXDLLEXPORT_BASE wxHashTableBase : public wxObject { public: wxHashTableBase(); @@ -76,7 +76,7 @@ private: // a hash table which stores longs // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxHashTableLong : public wxObject +class WXDLLEXPORT_BASE wxHashTableLong : public wxObject { public: wxHashTableLong(size_t size = wxHASH_SIZE_DEFAULT) @@ -114,7 +114,7 @@ private: // wxStringHashTable: a hash table which indexes strings with longs // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStringHashTable : public wxObject +class WXDLLEXPORT_BASE wxStringHashTable : public wxObject { public: wxStringHashTable(size_t sizeTable = wxHASH_SIZE_DEFAULT); @@ -147,7 +147,7 @@ private: // for compatibility only // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxHashTable : public wxObject +class WXDLLEXPORT_BASE wxHashTable : public wxObject { public: int n; diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 5bd69cea77..b992b72957 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -21,7 +21,7 @@ #include // for ptrdiff_t // private -struct WXDLLEXPORT _wxHashTable_NodeBase +struct WXDLLEXPORT_BASE _wxHashTable_NodeBase { _wxHashTable_NodeBase() : m_nxt(0) {} @@ -33,7 +33,7 @@ struct WXDLLEXPORT _wxHashTable_NodeBase }; // private -class WXDLLEXPORT _wxHashTableBase2 +class WXDLLEXPORT_BASE _wxHashTableBase2 { public: typedef void (*NodeDtor)(_wxHashTable_NodeBase*); @@ -407,7 +407,7 @@ inline bool grow_lf70( size_t buckets, size_t items ) // in the hash table class assignment operator (where they're assigned) // integer types -class WXDLLEXPORT wxIntegerHash +class WXDLLEXPORT_BASE wxIntegerHash { public: wxIntegerHash() { } @@ -421,7 +421,7 @@ public: wxIntegerHash& operator=(const wxIntegerHash&) { return *this; } }; -class WXDLLEXPORT wxIntegerEqual +class WXDLLEXPORT_BASE wxIntegerEqual { public: wxIntegerEqual() { } @@ -436,7 +436,7 @@ public: }; // pointers -class WXDLLEXPORT wxPointerHash +class WXDLLEXPORT_BASE wxPointerHash { public: wxPointerHash() { } @@ -448,7 +448,7 @@ public: wxPointerHash& operator=(const wxPointerHash&) { return *this; } }; -class WXDLLEXPORT wxPointerEqual +class WXDLLEXPORT_BASE wxPointerEqual { public: wxPointerEqual() { } @@ -458,7 +458,7 @@ public: }; // wxString, char*, wxChar* -class WXDLLEXPORT wxStringHash +class WXDLLEXPORT_BASE wxStringHash { public: wxStringHash() {} @@ -476,7 +476,7 @@ public: wxStringHash& operator=(const wxStringHash&) { return *this; } }; -class WXDLLEXPORT wxStringEqual +class WXDLLEXPORT_BASE wxStringEqual { public: wxStringEqual() {} diff --git a/include/wx/iconloc.h b/include/wx/iconloc.h index a1a5371a0d..4e929c5dce 100644 --- a/include/wx/iconloc.h +++ b/include/wx/iconloc.h @@ -18,7 +18,7 @@ // wxIconLocation: describes the location of an icon // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxIconLocationBase +class WXDLLEXPORT_BASE wxIconLocationBase { public: // ctor takes the name of the file where the icon is @@ -43,7 +43,7 @@ private: // index of the icon #if defined(__WXMSW__) -class WXDLLEXPORT wxIconLocation : public wxIconLocationBase +class WXDLLEXPORT_BASE wxIconLocation : public wxIconLocationBase { public: // ctor takes the name of the file where the icon is and the icons index in @@ -67,7 +67,13 @@ wxIconLocation::wxIconLocation(const wxString& file, int num) #else // !MSW -typedef wxIconLocationBase wxIconLocation; +// must be a class because we forward declare it as class +class WXDLLEXPORT_BASE wxIconLocation : public wxIconLocationBase +{ +public: + wxEXPLICIT wxIconLocation(const wxString& filename = wxEmptyString) + : wxIconLocationBase(filename) { } +}; #endif // platform diff --git a/include/wx/intl.h b/include/wx/intl.h index 7d92024a86..add1baa455 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -45,9 +45,9 @@ // forward decls // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLocale; -class WXDLLEXPORT wxMsgCatalog; -class WXDLLEXPORT wxLanguageInfoArray; +class WXDLLEXPORT_BASE wxLocale; +class WXDLLEXPORT_BASE wxMsgCatalog; +class WXDLLEXPORT_BASE wxLanguageInfoArray; // ============================================================================ // locale support @@ -308,7 +308,7 @@ enum wxLanguage // translation information // ---------------------------------------------------------------------------- -struct WXDLLEXPORT wxLanguageInfo +struct WXDLLEXPORT_BASE wxLanguageInfo { int Language; // wxLanguage id wxString CanonicalName; // Canonical name, e.g. fr_FR @@ -362,7 +362,7 @@ enum wxLocaleInitFlags wxLOCALE_CONV_ENCODING = 0x0002 // convert encoding on the fly? }; -class WXDLLEXPORT wxLocale +class WXDLLEXPORT_BASE wxLocale { public: // ctor & dtor @@ -522,7 +522,7 @@ private: // ---------------------------------------------------------------------------- // get the current locale object (note that it may be NULL!) -extern WXDLLEXPORT wxLocale* wxGetLocale(); +extern WXDLLEXPORT_BASE wxLocale* wxGetLocale(); // get the translation of the string in the current locale inline const wxChar *wxGetTranslation(const wxChar *sz) diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h index 5ed788a4cb..9e7119585a 100644 --- a/include/wx/ipcbase.h +++ b/include/wx/ipcbase.h @@ -42,10 +42,10 @@ enum wxIPCFormat wxIPC_PRIVATE = 20 }; -class WXDLLEXPORT wxServerBase; -class WXDLLEXPORT wxClientBase; +class WXDLLEXPORT_BASE wxServerBase; +class WXDLLEXPORT_BASE wxClientBase; -class WXDLLEXPORT wxConnectionBase: public wxObject +class WXDLLEXPORT_BASE wxConnectionBase: public wxObject { DECLARE_CLASS(wxConnectionBase) @@ -129,7 +129,7 @@ private: }; -class WXDLLEXPORT wxServerBase: public wxObject +class WXDLLEXPORT_BASE wxServerBase: public wxObject { DECLARE_CLASS(wxServerBase) @@ -144,7 +144,7 @@ public: virtual wxConnectionBase *OnAcceptConnection(const wxString& topic) = 0; }; -class WXDLLEXPORT wxClientBase: public wxObject +class WXDLLEXPORT_BASE wxClientBase: public wxObject { DECLARE_CLASS(wxClientBase) diff --git a/include/wx/list.h b/include/wx/list.h index 42fd54b6ad..14a8a802da 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -39,9 +39,9 @@ // due to circular header dependencies this function has to be declared here // (normally it's found in utils.h which includes itself list.h...) -extern WXDLLEXPORT wxChar* copystring(const wxChar *s); +extern WXDLLEXPORT_BASE wxChar* copystring(const wxChar *s); -class WXDLLEXPORT wxObjectListNode; +class WXDLLEXPORT_BASE wxObjectListNode; typedef wxObjectListNode wxNode; // undef it to get rid of old, deprecated functions @@ -88,7 +88,7 @@ union wxListKeyValue // for any keyed operation instead of 2 almost equivalent. OTOH, it's needed to // resolve ambiguity which we would otherwise have with wxStringList::Find() and // wxList::Find(const char *). -class WXDLLEXPORT wxListKey +class WXDLLEXPORT_BASE wxListKey { public: // implicit ctors @@ -129,11 +129,11 @@ private: // wxNodeBase class is a (base for) node in a double linked list // ----------------------------------------------------------------------------- -WXDLLEXPORT_DATA(extern wxListKey) wxDefaultListKey; +WXDLLEXPORT_DATA_BASE(extern wxListKey) wxDefaultListKey; -class WXDLLEXPORT wxListBase; +class WXDLLEXPORT_BASE wxListBase; -class WXDLLEXPORT wxNodeBase +class WXDLLEXPORT_BASE wxNodeBase { friend class wxListBase; public: @@ -193,9 +193,9 @@ private: class wxList; -class WXDLLEXPORT wxListBase : public wxObject +class WXDLLEXPORT_BASE wxListBase : public wxObject { -friend class WXDLLEXPORT wxNodeBase; // should be able to call DetachNode() +friend class WXDLLEXPORT_BASE wxNodeBase; // should be able to call DetachNode() friend class wxHashTableBase; // should be able to call untyped Find() private: // common part of all ctors @@ -515,9 +515,9 @@ private: // wxList compatibility class: in fact, it's a list of wxObjects // ----------------------------------------------------------------------------- -WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, class WXDLLEXPORT); +WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, class WXDLLEXPORT_BASE); -class WXDLLEXPORT wxList : public wxObjectList +class WXDLLEXPORT_BASE wxList : public wxObjectList { public: #ifdef wxWARN_COMPAT_LIST_USE @@ -545,9 +545,9 @@ private: // wxStringList class for compatibility with the old code // ----------------------------------------------------------------------------- -WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode, class WXDLLEXPORT); +WX_DECLARE_LIST_2(wxChar, wxStringListBase, wxStringListNode, class WXDLLEXPORT_BASE); -class WXDLLEXPORT wxStringList : public wxStringListBase +class WXDLLEXPORT_BASE wxStringList : public wxStringListBase { public: // ctors and such diff --git a/include/wx/log.h b/include/wx/log.h index 5d97fe53e2..256a38ead8 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -9,23 +9,26 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_LOG_H_ -#define _WX_LOG_H_ +#ifndef _WX_LOG_H_ +#define _WX_LOG_H_ #if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "log.h" #endif -#include "wx/setup.h" #include "wx/string.h" +#if wxUSE_LOG + // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTextCtrl; -class WXDLLEXPORT wxLogFrame; -class WXDLLEXPORT wxFrame; +#if wxUSE_GUI + class WXDLLEXPORT_CORE wxTextCtrl; + class WXDLLEXPORT_CORE wxLogFrame; + class WXDLLEXPORT_CORE wxFrame; +#endif // wxUSE_GUI // ---------------------------------------------------------------------------- // types @@ -38,8 +41,6 @@ typedef unsigned long wxLogLevel; // headers // ---------------------------------------------------------------------------- -#if wxUSE_LOG - #ifndef __WXWINCE__ #include // for time_t #endif @@ -108,7 +109,7 @@ enum // normally, only a single instance of this class exists but it's not enforced // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLog +class WXDLLEXPORT_BASE wxLog { public: // ctor @@ -260,7 +261,7 @@ private: // ---------------------------------------------------------------------------- // log everything to a "FILE *", stderr by default -class WXDLLEXPORT wxLogStderr : public wxLog +class WXDLLEXPORT_BASE wxLogStderr : public wxLog { DECLARE_NO_COPY_CLASS(wxLogStderr) @@ -278,7 +279,7 @@ protected: #if wxUSE_STD_IOSTREAM // log everything to an "ostream", cerr by default -class WXDLLEXPORT wxLogStream : public wxLog +class WXDLLEXPORT_BASE wxLogStream : public wxLog { public: // redirect log output to an ostream @@ -314,7 +315,7 @@ protected: // ~wxLogNull called, old log sink restored } */ -class WXDLLEXPORT wxLogNull +class WXDLLEXPORT_BASE wxLogNull { public: wxLogNull() : m_flagOld(wxLog::EnableLogging(FALSE)) { } @@ -333,7 +334,7 @@ private: // does it itself in its ctor // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxLogChain : public wxLog +class WXDLLEXPORT_BASE wxLogChain : public wxLog { public: wxLogChain(wxLog *logger); @@ -373,7 +374,7 @@ private: }; // a chain log target which uses itself as the new logger -class WXDLLEXPORT wxLogPassThrough : public wxLogChain +class WXDLLEXPORT_BASE wxLogPassThrough : public wxLogChain { public: wxLogPassThrough(); @@ -398,43 +399,45 @@ public: // ---------------------------------------------------------------------------- // return the last system error code -WXDLLEXPORT unsigned long wxSysErrorCode(); +WXDLLEXPORT_BASE unsigned long wxSysErrorCode(); // return the error message for given (or last if 0) error code -WXDLLEXPORT const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); +WXDLLEXPORT_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); // ---------------------------------------------------------------------------- // define wxLog // ---------------------------------------------------------------------------- -#define DECLARE_LOG_FUNCTION(level) \ -extern void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \ - va_list argptr); \ -extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, \ +#define DECLARE_LOG_FUNCTION(level) \ +extern void WXDLLEXPORT_BASE wxVLog##level(const wxChar *szFormat, \ + va_list argptr); \ +extern void WXDLLEXPORT_BASE wxLog##level(const wxChar *szFormat, \ ...) ATTRIBUTE_PRINTF_1 -#define DECLARE_LOG_FUNCTION2(level, arg1) \ -extern void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \ - va_list argptr); \ -extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, \ +#define DECLARE_LOG_FUNCTION2_EXP(level, arg, expdecl) \ +extern void expdecl wxVLog##level(arg, const wxChar *szFormat, \ + va_list argptr); \ +extern void expdecl wxLog##level(arg, const wxChar *szFormat, \ ...) ATTRIBUTE_PRINTF_2 +#define DECLARE_LOG_FUNCTION2(level, arg) \ + DECLARE_LOG_FUNCTION2_EXP(level, arg, WXDLLEXPORT_BASE) #else // !wxUSE_LOG // log functions do nothing at all -#define DECLARE_LOG_FUNCTION(level) \ -inline void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \ - va_list argptr) {} \ -inline void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...) {} -#define DECLARE_LOG_FUNCTION2(level, arg1) \ -inline void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \ - va_list argptr) {} \ -inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {} +#define DECLARE_LOG_FUNCTION(level) \ +inline void wxVLog##level(const wxChar *szFormat, \ + va_list argptr) { } \ +inline void wxLog##level(const wxChar *szFormat, ...) { } +#define DECLARE_LOG_FUNCTION2(level, arg) \ +inline void wxVLog##level(arg, const wxChar *szFormat, \ + va_list argptr) {} \ +inline void wxLog##level(arg, const wxChar *szFormat, ...) { } // Empty Class to fake wxLogNull -class WXDLLEXPORT wxLogNull +class WXDLLEXPORT_BASE wxLogNull { public: - wxLogNull() {} + wxLogNull() { } }; // Dummy macros to replace some functions. @@ -461,9 +464,11 @@ DECLARE_LOG_FUNCTION(Verbose); // application frame, if any DECLARE_LOG_FUNCTION(Status); -// this one is the same as previous except that it allows to explicitly -// specify the frame to which the output should go -DECLARE_LOG_FUNCTION2(Status, wxFrame *pFrame); +#if wxUSE_GUI + // this one is the same as previous except that it allows to explicitly + // specify the frame to which the output should go + DECLARE_LOG_FUNCTION2_EXP(Status, wxFrame *pFrame, WXDLLEXPORT_CORE); +#endif // wxUSE_GUI // additional one: as wxLogError, but also logs last system call error code // and the corresponding error message if available @@ -502,7 +507,8 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // wxLogFatalError helper: show the (fatal) error to the user in a safe way, // i.e. without using wxMessageBox() for example because it could crash -void WXDLLEXPORT wxSafeShowMessage(const wxString& title, const wxString& text); +void WXDLLEXPORT_BASE +wxSafeShowMessage(const wxString& title, const wxString& text); // ---------------------------------------------------------------------------- // debug only logging functions: use them with API name and error code diff --git a/include/wx/longlong.h b/include/wx/longlong.h index e2b2ea79b9..d59532ca9e 100644 --- a/include/wx/longlong.h +++ b/include/wx/longlong.h @@ -111,8 +111,8 @@ #define wxUSE_LONGLONG_NATIVE 0 #endif - class WXDLLEXPORT wxLongLongWx; - class WXDLLEXPORT wxULongLongWx; + class WXDLLEXPORT_BASE wxLongLongWx; + class WXDLLEXPORT_BASE wxULongLongWx; #if defined(__VISUALC__) && !defined(__WIN32__) #define wxLongLong wxLongLongWx #define wxULongLong wxULongLongWx @@ -130,8 +130,8 @@ #ifndef wxUSE_LONGLONG_WX #define wxUSE_LONGLONG_WX 0 - class WXDLLEXPORT wxLongLongNative; - class WXDLLEXPORT wxULongLongNative; + class WXDLLEXPORT_BASE wxLongLongNative; + class WXDLLEXPORT_BASE wxULongLongNative; typedef wxLongLongNative wxLongLong; typedef wxULongLongNative wxULongLong; #endif @@ -148,7 +148,7 @@ #if wxUSE_LONGLONG_NATIVE -class WXDLLEXPORT wxLongLongNative +class WXDLLEXPORT_BASE wxLongLongNative { public: // ctors @@ -350,7 +350,7 @@ private: }; -class WXDLLEXPORT wxULongLongNative +class WXDLLEXPORT_BASE wxULongLongNative { public: // ctors @@ -536,7 +536,7 @@ private: #if wxUSE_LONGLONG_WX -class WXDLLEXPORT wxLongLongWx +class WXDLLEXPORT_BASE wxLongLongWx { public: // ctors @@ -733,7 +733,7 @@ private: }; -class WXDLLEXPORT wxULongLongWx +class WXDLLEXPORT_BASE wxULongLongWx { public: // ctors diff --git a/include/wx/mac/combobox.h b/include/wx/mac/combobox.h index 5b73bc2b6b..3da2f84e6a 100644 --- a/include/wx/mac/combobox.h +++ b/include/wx/mac/combobox.h @@ -20,7 +20,6 @@ #include "wx/choice.h" WXDLLEXPORT_DATA(extern const wxChar*) wxComboBoxNameStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // Combobox item class WXDLLEXPORT wxComboBox: public wxComboBoxBase , public wxControl diff --git a/include/wx/mac/textctrl.h b/include/wx/mac/textctrl.h index 9db4464db2..baa7ab853d 100644 --- a/include/wx/mac/textctrl.h +++ b/include/wx/mac/textctrl.h @@ -19,7 +19,6 @@ #include "wx/control.h" WXDLLEXPORT_DATA(extern const wxChar*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // Single-line text item class WXDLLEXPORT wxTextCtrl: public wxTextCtrlBase diff --git a/include/wx/memory.h b/include/wx/memory.h index 71b5968d36..89f6d7e25e 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -30,8 +30,8 @@ #ifdef __WXDEBUG__ -WXDLLEXPORT void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = FALSE); -WXDLLEXPORT void wxDebugFree(void * buf, bool isVect = FALSE); +WXDLLEXPORT_BASE void * wxDebugAlloc(size_t size, wxChar * fileName, int lineNum, bool isObject, bool isVect = FALSE); +WXDLLEXPORT_BASE void wxDebugFree(void * buf, bool isVect = FALSE); //********************************************************************************** /* @@ -124,9 +124,9 @@ typedef unsigned int wxMarkerType; allocated memory. */ -class WXDLLEXPORT wxMemStruct { +class WXDLLEXPORT_BASE wxMemStruct { -friend class WXDLLEXPORT wxDebugContext; // access to the m_next pointer for list traversal. +friend class WXDLLEXPORT_BASE wxDebugContext; // access to the m_next pointer for list traversal. public: public: @@ -202,7 +202,7 @@ typedef void (wxMemStruct::*PmSFV) (); globals which have to do with the wxMemStruct class. */ -class WXDLLEXPORT wxDebugContext { +class WXDLLEXPORT_BASE wxDebugContext { protected: // Used to set alignment for markers. @@ -300,8 +300,8 @@ private: }; // Output a debug message, in a system dependent fashion. -void WXDLLEXPORT wxTrace(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1; -void WXDLLEXPORT wxTraceLevel(int level, const wxChar *fmt ...) ATTRIBUTE_PRINTF_2; +void WXDLLEXPORT_BASE wxTrace(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1; +void WXDLLEXPORT_BASE wxTraceLevel(int level, const wxChar *fmt ...) ATTRIBUTE_PRINTF_2; #define WXTRACE wxTrace #define WXTRACELEVEL wxTraceLevel diff --git a/include/wx/memtext.h b/include/wx/memtext.h index 942493c7dc..3cf08b7835 100644 --- a/include/wx/memtext.h +++ b/include/wx/memtext.h @@ -19,7 +19,7 @@ // wxMemoryText // ---------------------------------------------------------------------------- -class wxMemoryText : public wxTextBuffer +class WXDLLEXPORT_BASE wxMemoryText : public wxTextBuffer { public: // Constructors. diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 973162160c..5b6bb088e7 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -30,14 +30,9 @@ #include "wx/dynarray.h" // fwd decls -#if defined(__WXMSW__) -class WXDLLEXPORT wxIconLocation; -#else -class WXDLLEXPORT wxIconLocationBase; -typedef wxIconLocationBase wxIconLocation; -#endif //defined(__WXMSW__) -class WXDLLEXPORT wxFileTypeImpl; -class WXDLLEXPORT wxMimeTypesManagerImpl; +class WXDLLEXPORT_BASE wxIconLocation; +class WXDLLEXPORT_BASE wxFileTypeImpl; +class WXDLLEXPORT_BASE wxMimeTypesManagerImpl; // these constants define the MIME informations source under UNIX and are used // by wxMimeTypesManager::Initialize() @@ -54,7 +49,7 @@ enum wxMailcapStyle /* TODO: would it be more convenient to have this class? -class WXDLLEXPORT wxMimeType : public wxString +class WXDLLEXPORT_BASE wxMimeType : public wxString { public: // all string ctors here @@ -81,7 +76,7 @@ public: // This class is used with wxMimeTypesManager::AddFallbacks() and Associate() // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileTypeInfo +class WXDLLEXPORT_BASE wxFileTypeInfo { public: // ctors @@ -167,9 +162,9 @@ WX_DECLARE_EXPORTED_OBJARRAY(wxFileTypeInfo, wxArrayFileTypeInfo); // the accessors *must* be checked! // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileType +class WXDLLEXPORT_BASE wxFileType { -friend class WXDLLEXPORT wxMimeTypesManagerImpl; // it has access to m_impl +friend class WXDLLEXPORT_BASE wxMimeTypesManagerImpl; // it has access to m_impl public: // An object of this class must be passed to Get{Open|Print}Command. The @@ -283,7 +278,7 @@ private: // given type) about them. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMimeTypesManager +class WXDLLEXPORT_BASE wxMimeTypesManager { public: // static helper functions @@ -390,7 +385,7 @@ private: // ---------------------------------------------------------------------------- // the default mime manager for wxWindows programs -WXDLLEXPORT_DATA(extern wxMimeTypesManager *) wxTheMimeTypesManager; +WXDLLEXPORT_DATA_BASE(extern wxMimeTypesManager *) wxTheMimeTypesManager; #endif // wxUSE_MIMETYPE diff --git a/include/wx/module.h b/include/wx/module.h index aeee79b942..f1fff93994 100644 --- a/include/wx/module.h +++ b/include/wx/module.h @@ -26,7 +26,7 @@ WX_DECLARE_EXPORTED_LIST(wxModule, wxModuleList); // declaring a class derived from wxModule will automatically create an // instance of this class on program startup, call its OnInit() method and call // OnExit() on program termination (but only if OnInit() succeeded) -class WXDLLEXPORT wxModule : public wxObject +class WXDLLEXPORT_BASE wxModule : public wxObject { public: wxModule() {} diff --git a/include/wx/msgout.h b/include/wx/msgout.h index f6422c6f38..747f2a9d40 100755 --- a/include/wx/msgout.h +++ b/include/wx/msgout.h @@ -28,7 +28,7 @@ // something you can printf() to // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMessageOutput +class WXDLLEXPORT_BASE wxMessageOutput { public: virtual ~wxMessageOutput() { } @@ -50,7 +50,7 @@ private: // implementation which sends output to stderr // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMessageOutputStderr : public wxMessageOutput +class WXDLLEXPORT_BASE wxMessageOutputStderr : public wxMessageOutput { public: wxMessageOutputStderr() { } @@ -64,7 +64,7 @@ public: #if wxUSE_GUI -class WXDLLEXPORT wxMessageOutputMessageBox : public wxMessageOutput +class WXDLLEXPORT_CORE wxMessageOutputMessageBox : public wxMessageOutput { public: wxMessageOutputMessageBox() { } @@ -78,7 +78,7 @@ public: // implementation using the native way of outputting debug messages // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMessageOutputDebug : public wxMessageOutput +class WXDLLEXPORT_BASE wxMessageOutputDebug : public wxMessageOutput { public: wxMessageOutputDebug() { } @@ -90,7 +90,7 @@ public: // implementation using wxLog (mainly for backwards compatibility) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMessageOutputLog : public wxMessageOutput +class WXDLLEXPORT_BASE wxMessageOutputLog : public wxMessageOutput { public: wxMessageOutputLog() { } diff --git a/include/wx/mstream.h b/include/wx/mstream.h index d80cd3a401..1f9a8aea9f 100644 --- a/include/wx/mstream.h +++ b/include/wx/mstream.h @@ -16,7 +16,7 @@ #if wxUSE_STREAMS -class WXDLLEXPORT wxMemoryInputStream : public wxInputStream +class WXDLLEXPORT_BASE wxMemoryInputStream : public wxInputStream { public: wxMemoryInputStream(const void *data, size_t length); @@ -44,7 +44,7 @@ private: DECLARE_NO_COPY_CLASS(wxMemoryInputStream) }; -class WXDLLEXPORT wxMemoryOutputStream : public wxOutputStream +class WXDLLEXPORT_BASE wxMemoryOutputStream : public wxOutputStream { public: // if data is !NULL it must be allocated with malloc() diff --git a/include/wx/msw/combobox.h b/include/wx/msw/combobox.h index 6c911828e9..d143bdf367 100644 --- a/include/wx/msw/combobox.h +++ b/include/wx/msw/combobox.h @@ -20,8 +20,6 @@ #if wxUSE_COMBOBOX -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - // ---------------------------------------------------------------------------- // Combobox control // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/dde.h b/include/wx/msw/dde.h index 1c9627d55a..7193ee45e6 100644 --- a/include/wx/msw/dde.h +++ b/include/wx/msw/dde.h @@ -42,10 +42,10 @@ * */ -class WXDLLEXPORT wxDDEServer; -class WXDLLEXPORT wxDDEClient; +class WXDLLEXPORT_BASE wxDDEServer; +class WXDLLEXPORT_BASE wxDDEClient; -class WXDLLEXPORT wxDDEConnection: public wxConnectionBase +class WXDLLEXPORT_BASE wxDDEConnection: public wxConnectionBase { DECLARE_DYNAMIC_CLASS(wxDDEConnection) public: @@ -82,7 +82,7 @@ public: DECLARE_NO_COPY_CLASS(wxDDEConnection) }; -class WXDLLEXPORT wxDDEServer: public wxServerBase +class WXDLLEXPORT_BASE wxDDEServer: public wxServerBase { DECLARE_DYNAMIC_CLASS(wxDDEServer) public: @@ -111,7 +111,7 @@ protected: wxDDEConnectionList m_connections; }; -class WXDLLEXPORT wxDDEClient: public wxClientBase +class WXDLLEXPORT_BASE wxDDEClient: public wxClientBase { DECLARE_DYNAMIC_CLASS(wxDDEClient) public: @@ -140,8 +140,8 @@ protected: wxDDEConnectionList m_connections; }; -void WXDLLEXPORT wxDDEInitialize(); -void WXDLLEXPORT wxDDECleanUp(); +void WXDLLEXPORT_BASE wxDDEInitialize(); +void WXDLLEXPORT_BASE wxDDECleanUp(); #endif // _WX_DDE_H_ diff --git a/include/wx/msw/mimetype.h b/include/wx/msw/mimetype.h index a9ba9b63be..269b9e98c5 100644 --- a/include/wx/msw/mimetype.h +++ b/include/wx/msw/mimetype.h @@ -27,7 +27,7 @@ // and is never used directly by the application // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileTypeImpl +class WXDLLEXPORT_BASE wxFileTypeImpl { public: // ctor @@ -92,7 +92,7 @@ private: bool RemoveDescription(); }; -class WXDLLEXPORT wxMimeTypesManagerImpl +class WXDLLEXPORT_BASE wxMimeTypesManagerImpl { public: // nothing to do here, we don't load any data but just go and fetch it from diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index c017a715f7..32156df767 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -486,9 +486,9 @@ private: // global data // --------------------------------------------------------------------------- -WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; +WXDLLEXPORT_DATA_BASE(extern wxChar*) wxBuffer; -WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; +WXDLLEXPORT_DATA_BASE(extern HINSTANCE) wxhInstance; // --------------------------------------------------------------------------- // global functions diff --git a/include/wx/object.h b/include/wx/object.h index 8627c53661..78331a8a9a 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -24,7 +24,7 @@ #include "wx/defs.h" #include "wx/memory.h" -class WXDLLEXPORT wxObject; +class WXDLLEXPORT_BASE wxObject; #if wxUSE_DYNAMIC_CLASSES @@ -41,9 +41,9 @@ class WXDLLEXPORT wxObject; #undef GetClassInfo #endif -class WXDLLEXPORT wxClassInfo; -class WXDLLEXPORT wxHashTable; -class WXDLLEXPORT wxObjectRefData; +class WXDLLEXPORT_BASE wxClassInfo; +class WXDLLEXPORT_BASE wxHashTable; +class WXDLLEXPORT_BASE wxObjectRefData; // ---------------------------------------------------------------------------- // wxClassInfo @@ -51,7 +51,7 @@ class WXDLLEXPORT wxObjectRefData; typedef wxObject *(*wxObjectConstructorFn)(void); -class WXDLLEXPORT wxClassInfo +class WXDLLEXPORT_BASE wxClassInfo { public: wxClassInfo( const wxChar *className, @@ -133,7 +133,7 @@ private: DECLARE_NO_COPY_CLASS(wxClassInfo) }; -WXDLLEXPORT wxObject *wxCreateDynamicObject(const wxChar *name); +WXDLLEXPORT_BASE wxObject *wxCreateDynamicObject(const wxChar *name); // ---------------------------------------------------------------------------- // Dynamic class macros @@ -392,7 +392,7 @@ inline void wxCheckCast(void *ptr) // wxObject: the root class of wxWindows object hierarchy // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxObject +class WXDLLEXPORT_BASE wxObject { DECLARE_ABSTRACT_CLASS(wxObject) @@ -490,9 +490,9 @@ protected: // wxObjectRefData: ref counted data meant to be stored in wxObject // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxObjectRefData +class WXDLLEXPORT_BASE wxObjectRefData { - friend class WXDLLEXPORT wxObject; + friend class WXDLLEXPORT_BASE wxObject; public: wxObjectRefData() : m_count(1) { } diff --git a/include/wx/process.h b/include/wx/process.h index 142d18d8da..893e1b3874 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -39,7 +39,7 @@ enum // function will be called when the process terminates. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxProcess : public wxEvtHandler +class WXDLLEXPORT_BASE wxProcess : public wxEvtHandler { public: // kill the process with the given PID @@ -139,7 +139,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_END_PROCESS, 440) END_DECLARE_EVENT_TYPES() -class WXDLLEXPORT wxProcessEvent : public wxEvent +class WXDLLEXPORT_BASE wxProcessEvent : public wxEvent { public: wxProcessEvent(int id = 0, int pid = 0, int exitcode = 0) : wxEvent(id) diff --git a/include/wx/protocol/ftp.h b/include/wx/protocol/ftp.h index c76355b1da..b44eaf2305 100644 --- a/include/wx/protocol/ftp.h +++ b/include/wx/protocol/ftp.h @@ -25,7 +25,7 @@ #include "wx/protocol/protocol.h" #include "wx/url.h" -class WXDLLEXPORT wxFTP : public wxProtocol +class WXDLLEXPORT_BASE wxFTP : public wxProtocol { public: enum TransferMode diff --git a/include/wx/protocol/http.h b/include/wx/protocol/http.h index 5cc6e8e5bb..83cba116b4 100644 --- a/include/wx/protocol/http.h +++ b/include/wx/protocol/http.h @@ -18,7 +18,7 @@ #include "wx/list.h" #include "wx/protocol/protocol.h" -class WXDLLEXPORT wxHTTP : public wxProtocol { +class WXDLLEXPORT_BASE wxHTTP : public wxProtocol { DECLARE_DYNAMIC_CLASS(wxHTTP) DECLARE_PROTOCOL(wxHTTP) protected: diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h index f4f7997a98..f1a7780be1 100644 --- a/include/wx/protocol/protocol.h +++ b/include/wx/protocol/protocol.h @@ -50,7 +50,7 @@ typedef enum // wxProtocol: abstract base class for all protocols // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxProtocol +class WXDLLEXPORT_BASE wxProtocol #if wxUSE_SOCKETS : public wxSocketClient #else @@ -86,7 +86,7 @@ private: }; #if wxUSE_SOCKETS -wxProtocolError WXDLLEXPORT GetLine(wxSocketBase *sock, wxString& result); +wxProtocolError WXDLLEXPORT_BASE GetLine(wxSocketBase *sock, wxString& result); #endif // ---------------------------------------------------------------------------- @@ -108,7 +108,7 @@ bool wxProtocolUse##class = TRUE; wxProtocolUserFor##class() { wxProtocolUse##class = TRUE; } \ } wxProtocolDoUse##class; -class WXDLLEXPORT wxProtoInfo : public wxObject +class WXDLLEXPORT_BASE wxProtoInfo : public wxObject { public: wxProtoInfo(const wxChar *name, diff --git a/include/wx/regex.h b/include/wx/regex.h index 812405852f..336631495f 100644 --- a/include/wx/regex.h +++ b/include/wx/regex.h @@ -20,7 +20,7 @@ #if wxUSE_REGEX -class WXDLLEXPORT wxString; +class WXDLLEXPORT_BASE wxString; // ---------------------------------------------------------------------------- // constants @@ -67,9 +67,9 @@ enum // wxRegEx: a regular expression // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxRegExImpl; +class WXDLLEXPORT_BASE wxRegExImpl; -class WXDLLEXPORT wxRegEx +class WXDLLEXPORT_BASE wxRegEx { public: // default ctor: use Compile() later diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index d3cbf185a6..da59b94128 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -24,7 +24,7 @@ #include "wx/gsocket.h" -class WXDLLEXPORT wxSockAddress : public wxObject { +class WXDLLEXPORT_BASE wxSockAddress : public wxObject { DECLARE_ABSTRACT_CLASS(wxSockAddress) public: typedef enum { IPV4=1, IPV6=2, UNIX=3 } Addr; @@ -52,7 +52,7 @@ private: void Init(); }; -class WXDLLEXPORT wxIPV4address : public wxSockAddress { +class WXDLLEXPORT_BASE wxIPV4address : public wxSockAddress { DECLARE_DYNAMIC_CLASS(wxIPV4address) public: wxIPV4address(); @@ -78,7 +78,7 @@ private: }; #ifdef ENABLE_IPV6 -class WXDLLEXPORT wxIPV6address : public wxSockAddress { +class WXDLLEXPORT_BASE wxIPV6address : public wxSockAddress { DECLARE_DYNAMIC_CLASS(wxIPV6address) private: struct sockaddr_in6 *m_addr; @@ -107,7 +107,7 @@ public: # include #endif -class WXDLLEXPORT wxUNIXaddress : public wxSockAddress { +class WXDLLEXPORT_BASE wxUNIXaddress : public wxSockAddress { DECLARE_DYNAMIC_CLASS(wxUNIXaddress) private: struct sockaddr_un *m_addr; diff --git a/include/wx/sckipc.h b/include/wx/sckipc.h index dec0233480..9e5b847389 100644 --- a/include/wx/sckipc.h +++ b/include/wx/sckipc.h @@ -53,10 +53,10 @@ * */ -class WXDLLEXPORT wxTCPServer; -class WXDLLEXPORT wxTCPClient; +class WXDLLEXPORT_BASE wxTCPServer; +class WXDLLEXPORT_BASE wxTCPClient; -class WXDLLEXPORT wxTCPConnection: public wxConnectionBase +class WXDLLEXPORT_BASE wxTCPConnection: public wxConnectionBase { DECLARE_DYNAMIC_CLASS(wxTCPConnection) diff --git a/include/wx/sckstrm.h b/include/wx/sckstrm.h index b6a060d298..d48caed6fb 100644 --- a/include/wx/sckstrm.h +++ b/include/wx/sckstrm.h @@ -21,7 +21,7 @@ #include "wx/socket.h" -class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream +class WXDLLEXPORT_BASE wxSocketOutputStream : public wxOutputStream { public: wxSocketOutputStream(wxSocketBase& s); @@ -40,7 +40,7 @@ class WXDLLEXPORT wxSocketOutputStream : public wxOutputStream DECLARE_NO_COPY_CLASS(wxSocketOutputStream) }; -class WXDLLEXPORT wxSocketInputStream : public wxInputStream +class WXDLLEXPORT_BASE wxSocketInputStream : public wxInputStream { public: wxSocketInputStream(wxSocketBase& s); @@ -59,7 +59,7 @@ class WXDLLEXPORT wxSocketInputStream : public wxInputStream DECLARE_NO_COPY_CLASS(wxSocketInputStream) }; -class WXDLLEXPORT wxSocketStream : public wxSocketInputStream, +class WXDLLEXPORT_BASE wxSocketStream : public wxSocketInputStream, public wxSocketOutputStream { public: diff --git a/include/wx/snglinst.h b/include/wx/snglinst.h index 114b73b3d1..75c89b5cab 100644 --- a/include/wx/snglinst.h +++ b/include/wx/snglinst.h @@ -23,7 +23,7 @@ // wxSingleInstanceChecker // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxSingleInstanceChecker +class WXDLLEXPORT_BASE wxSingleInstanceChecker { public: // default ctor, use Create() after it @@ -59,7 +59,7 @@ private: void Init() { m_impl = NULL; } // the implementation details (platform specific) - class WXDLLEXPORT wxSingleInstanceCheckerImpl *m_impl; + class WXDLLEXPORT_BASE wxSingleInstanceCheckerImpl *m_impl; DECLARE_NO_COPY_CLASS(wxSingleInstanceChecker) }; diff --git a/include/wx/socket.h b/include/wx/socket.h index df32866665..f4d1ecf998 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -105,7 +105,7 @@ typedef int wxSocketFlags; // wxSocketBase // -------------------------------------------------------------------------- -class WXDLLEXPORT wxSocketBase : public wxObject +class WXDLLEXPORT_BASE wxSocketBase : public wxObject { DECLARE_CLASS(wxSocketBase) @@ -270,7 +270,7 @@ private: // wxSocketServer // -------------------------------------------------------------------------- -class WXDLLEXPORT wxSocketServer : public wxSocketBase +class WXDLLEXPORT_BASE wxSocketServer : public wxSocketBase { DECLARE_CLASS(wxSocketServer) @@ -290,7 +290,7 @@ public: // wxSocketClient // -------------------------------------------------------------------------- -class WXDLLEXPORT wxSocketClient : public wxSocketBase +class WXDLLEXPORT_BASE wxSocketClient : public wxSocketBase { DECLARE_CLASS(wxSocketClient) @@ -312,7 +312,7 @@ public: // WARNING: still in alpha stage -class WXDLLEXPORT wxDatagramSocket : public wxSocketBase +class WXDLLEXPORT_BASE wxDatagramSocket : public wxSocketBase { DECLARE_CLASS(wxDatagramSocket) @@ -337,7 +337,7 @@ public: // wxSocketEvent // -------------------------------------------------------------------------- -class WXDLLEXPORT wxSocketEvent : public wxEvent +class WXDLLEXPORT_BASE wxSocketEvent : public wxEvent { public: wxSocketEvent(int id = 0) diff --git a/include/wx/stopwatch.h b/include/wx/stopwatch.h index 52773f969d..9a014c5cd8 100644 --- a/include/wx/stopwatch.h +++ b/include/wx/stopwatch.h @@ -17,7 +17,7 @@ #if wxUSE_STOPWATCH -class WXDLLEXPORT wxStopWatch +class WXDLLEXPORT_BASE wxStopWatch { public: // ctor starts the stop watch @@ -67,11 +67,11 @@ private: // Starts a global timer // -- DEPRECATED: use wxStopWatch instead -void WXDLLEXPORT wxStartTimer(); +void WXDLLEXPORT_BASE wxStartTimer(); // Gets elapsed milliseconds since last wxStartTimer or wxGetElapsedTime // -- DEPRECATED: use wxStopWatch instead -long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); +long WXDLLEXPORT_BASE wxGetElapsedTime(bool resetTimer = TRUE); #endif // wxUSE_LONGLONG @@ -80,14 +80,14 @@ long WXDLLEXPORT wxGetElapsedTime(bool resetTimer = TRUE); // ---------------------------------------------------------------------------- // Get number of seconds since local time 00:00:00 Jan 1st 1970. -extern long WXDLLEXPORT wxGetLocalTime(); +extern long WXDLLEXPORT_BASE wxGetLocalTime(); // Get number of seconds since GMT 00:00:00, Jan 1st 1970. -extern long WXDLLEXPORT wxGetUTCTime(); +extern long WXDLLEXPORT_BASE wxGetUTCTime(); #if wxUSE_LONGLONG // Get number of milliseconds since local time 00:00:00 Jan 1st 1970 -extern wxLongLong WXDLLEXPORT wxGetLocalTimeMillis(); +extern wxLongLong WXDLLEXPORT_BASE wxGetLocalTimeMillis(); #endif // wxUSE_LONGLONG #define wxGetCurrentTime() wxGetLocalTime() diff --git a/include/wx/strconv.h b/include/wx/strconv.h index 8a8cc13880..07b8de5226 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -36,7 +36,7 @@ // wxMBConv (base class for conversions, using libc conversion itself) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMBConv +class WXDLLEXPORT_BASE wxMBConv { public: // the actual conversion takes place here @@ -63,33 +63,33 @@ public: virtual ~wxMBConv(); }; -WXDLLEXPORT_DATA(extern wxMBConv) wxConvLibc; +WXDLLEXPORT_DATA_BASE(extern wxMBConv) wxConvLibc; // ---------------------------------------------------------------------------- // wxMBConvUTF7 (for conversion using UTF7 encoding) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMBConvUTF7 : public wxMBConv +class WXDLLEXPORT_BASE wxMBConvUTF7 : public wxMBConv { public: virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const; virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const; }; -WXDLLEXPORT_DATA(extern wxMBConvUTF7) wxConvUTF7; +WXDLLEXPORT_DATA_BASE(extern wxMBConvUTF7) wxConvUTF7; // ---------------------------------------------------------------------------- // wxMBConvUTF8 (for conversion using UTF8 encoding) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMBConvUTF8 : public wxMBConv +class WXDLLEXPORT_BASE wxMBConvUTF8 : public wxMBConv { public: virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const; virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const; }; -WXDLLEXPORT_DATA(extern wxMBConvUTF8) wxConvUTF8; +WXDLLEXPORT_DATA_BASE(extern wxMBConvUTF8) wxConvUTF8; #ifdef __WXGTK12__ @@ -97,14 +97,14 @@ WXDLLEXPORT_DATA(extern wxMBConvUTF8) wxConvUTF8; // wxMBConvUTF8 (for conversion using GDK's internal converions) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMBConvGdk : public wxMBConv +class WXDLLEXPORT_BASE wxMBConvGdk : public wxMBConv { public: virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const; virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const; }; -WXDLLEXPORT_DATA(extern wxMBConvGdk) wxConvGdk; +WXDLLEXPORT_DATA_BASE(extern wxMBConvGdk) wxConvGdk; #endif // wxGTK 1.2 @@ -112,9 +112,9 @@ WXDLLEXPORT_DATA(extern wxMBConvGdk) wxConvGdk; // wxCSConv (for conversion based on loadable char sets) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxCharacterSet; +class WXDLLEXPORT_BASE wxCharacterSet; -class WXDLLEXPORT wxCSConv : public wxMBConv +class WXDLLEXPORT_BASE wxCSConv : public wxMBConv { public: wxCSConv(const wxChar *charset); @@ -141,9 +141,9 @@ private: }; #define wxConvFile wxConvLocal -WXDLLEXPORT_DATA(extern wxCSConv) wxConvLocal; -WXDLLEXPORT_DATA(extern wxCSConv) wxConvISO8859_1; -WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent; +WXDLLEXPORT_DATA_BASE(extern wxCSConv) wxConvLocal; +WXDLLEXPORT_DATA_BASE(extern wxCSConv) wxConvISO8859_1; +WXDLLEXPORT_DATA_BASE(extern wxMBConv *) wxConvCurrent; // ---------------------------------------------------------------------------- // filename conversion macros @@ -171,15 +171,15 @@ WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent; // stand-ins in absence of wchar_t // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxMBConv +class WXDLLEXPORT_BASE wxMBConv { public: const char* cMB2WX(const char *psz) const { return psz; } const char* cWX2MB(const char *psz) const { return psz; } }; -WXDLLEXPORT_DATA(extern wxMBConv) wxConvLibc, wxConvFile, wxConvLocal, wxConvISO8859_1, wxConvUTF8; -WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent; +WXDLLEXPORT_DATA_BASE(extern wxMBConv) wxConvLibc, wxConvFile, wxConvLocal, wxConvISO8859_1, wxConvUTF8; +WXDLLEXPORT_DATA_BASE(extern wxMBConv *) wxConvCurrent; #define wxFNCONV(name) name #define wxFNSTRINGCAST WXSTRINGCAST diff --git a/include/wx/stream.h b/include/wx/stream.h index 6e8b1749f2..2fdae2f2e3 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -25,14 +25,14 @@ #include "wx/string.h" #include "wx/filefn.h" // for off_t, wxInvalidOffset and wxSeekMode -class WXDLLEXPORT wxStreamBase; -class WXDLLEXPORT wxInputStream; -class WXDLLEXPORT wxOutputStream; +class WXDLLEXPORT_BASE wxStreamBase; +class WXDLLEXPORT_BASE wxInputStream; +class WXDLLEXPORT_BASE wxOutputStream; typedef wxInputStream& (*__wxInputManip)(wxInputStream&); typedef wxOutputStream& (*__wxOutputManip)(wxOutputStream&); -WXDLLEXPORT wxOutputStream& wxEndL(wxOutputStream& o_stream); +WXDLLEXPORT_BASE wxOutputStream& wxEndL(wxOutputStream& o_stream); // ---------------------------------------------------------------------------- // constants @@ -67,7 +67,7 @@ enum wxStreamError // wxStreamBase: common (but non virtual!) base for all stream classes // --------------------------------------------------------------------------- -class WXDLLEXPORT wxStreamBase +class WXDLLEXPORT_BASE wxStreamBase { public: wxStreamBase(); @@ -106,7 +106,7 @@ protected: // wxInputStream: base class for the input streams // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxInputStream : public wxStreamBase +class WXDLLEXPORT_BASE wxInputStream : public wxStreamBase { public: // ctor and dtor, nothing exciting @@ -238,7 +238,7 @@ protected: // wxOutputStream: base for the output streams // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxOutputStream : public wxStreamBase +class WXDLLEXPORT_BASE wxOutputStream : public wxStreamBase { public: wxOutputStream(); @@ -274,7 +274,7 @@ protected: // A stream for measuring streamed output // --------------------------------------------------------------------------- -class WXDLLEXPORT wxCountingOutputStream : public wxOutputStream +class WXDLLEXPORT_BASE wxCountingOutputStream : public wxOutputStream { public: wxCountingOutputStream(); @@ -294,7 +294,7 @@ protected: // "Filter" streams // --------------------------------------------------------------------------- -class WXDLLEXPORT wxFilterInputStream : public wxInputStream +class WXDLLEXPORT_BASE wxFilterInputStream : public wxInputStream { public: wxFilterInputStream(); @@ -313,7 +313,7 @@ protected: DECLARE_NO_COPY_CLASS(wxFilterInputStream) }; -class WXDLLEXPORT wxFilterOutputStream : public wxOutputStream +class WXDLLEXPORT_BASE wxFilterOutputStream : public wxOutputStream { public: wxFilterOutputStream(); @@ -339,7 +339,7 @@ protected: // wxBufferedStreams to implement custom buffering // --------------------------------------------------------------------------- -class WXDLLEXPORT wxStreamBuffer +class WXDLLEXPORT_BASE wxStreamBuffer { public: enum BufMode @@ -457,7 +457,7 @@ private: // wxBufferedInputStream // --------------------------------------------------------------------------- -class WXDLLEXPORT wxBufferedInputStream : public wxFilterInputStream +class WXDLLEXPORT_BASE wxBufferedInputStream : public wxFilterInputStream { public: // if a non NULL buffer is given to the stream, it will be deleted by it @@ -493,7 +493,7 @@ protected: // wxBufferedOutputStream // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxBufferedOutputStream : public wxFilterOutputStream +class WXDLLEXPORT_BASE wxBufferedOutputStream : public wxFilterOutputStream { public: // if a non NULL buffer is given to the stream, it will be deleted by it diff --git a/include/wx/string.h b/include/wx/string.h index d082d97b73..dacd065248 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -101,7 +101,7 @@ const unsigned int wxSTRING_MAXLEN = UINT_MAX - 100; // ---------------------------------------------------------------------------- // global pointer to empty string -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; +extern WXDLLEXPORT_DATA_BASE(const wxChar*) wxEmptyString; // --------------------------------------------------------------------------- // global functions complementing standard C string library replacements for @@ -166,7 +166,7 @@ inline int Stricmp(const char *psz1, const char *psz2) } // return an empty wxString -class WXDLLEXPORT wxString; // not yet defined +class WXDLLEXPORT_BASE wxString; // not yet defined inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; } // --------------------------------------------------------------------------- @@ -174,7 +174,7 @@ inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; // is never used directly (but had to be put here to allow inlining) // --------------------------------------------------------------------------- -struct WXDLLEXPORT wxStringData +struct WXDLLEXPORT_BASE wxStringData { int nRefs; // reference count size_t nDataLength, // actual string length @@ -233,9 +233,9 @@ struct WXDLLEXPORT wxStringData // - regular expressions support // --------------------------------------------------------------------------- -class WXDLLEXPORT wxString +class WXDLLEXPORT_BASE wxString { -friend class WXDLLEXPORT wxArrayString; +friend class WXDLLEXPORT_BASE wxArrayString; // NB: special care was taken in arranging the member functions in such order // that all inline functions can be effectively inlined, verify that all @@ -607,15 +607,15 @@ public: // non-destructive concatenation // - friend wxString WXDLLEXPORT operator+(const wxString& string1, const wxString& string2); + friend wxString WXDLLEXPORT_BASE operator+(const wxString& string1, const wxString& string2); // - friend wxString WXDLLEXPORT operator+(const wxString& string, wxChar ch); + friend wxString WXDLLEXPORT_BASE operator+(const wxString& string, wxChar ch); // - friend wxString WXDLLEXPORT operator+(wxChar ch, const wxString& string); + friend wxString WXDLLEXPORT_BASE operator+(wxChar ch, const wxString& string); // - friend wxString WXDLLEXPORT operator+(const wxString& string, const wxChar *psz); + friend wxString WXDLLEXPORT_BASE operator+(const wxString& string, const wxChar *psz); // - friend wxString WXDLLEXPORT operator+(const wxChar *psz, const wxString& string); + friend wxString WXDLLEXPORT_BASE operator+(const wxChar *psz, const wxString& string); // stream-like functions // insert an int into string @@ -1027,7 +1027,7 @@ public: // from the array (operator[] or Item() method), a reference is returned. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxArrayString +class WXDLLEXPORT_BASE wxArrayString { public: // type of function used by wxArrayString::Sort() @@ -1151,7 +1151,7 @@ private: bool m_autoSort; // if TRUE, keep the array always sorted }; -class WXDLLEXPORT wxSortedArrayString : public wxArrayString +class WXDLLEXPORT_BASE wxSortedArrayString : public wxArrayString { public: wxSortedArrayString() : wxArrayString(TRUE) @@ -1164,7 +1164,7 @@ public: // wxStringBuffer: a tiny class allowing to get a writable pointer into string // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStringBuffer +class WXDLLEXPORT_BASE wxStringBuffer { public: wxStringBuffer(wxString& str, size_t lenWanted = 1024) @@ -1249,11 +1249,11 @@ inline bool operator!=(const wxCharBuffer& s1, const wxString& s2) { return (s2.Cmp((const char *)s1) != 0); } #endif // wxUSE_UNICODE/!wxUSE_UNICODE -wxString WXDLLEXPORT operator+(const wxString& string1, const wxString& string2); -wxString WXDLLEXPORT operator+(const wxString& string, wxChar ch); -wxString WXDLLEXPORT operator+(wxChar ch, const wxString& string); -wxString WXDLLEXPORT operator+(const wxString& string, const wxChar *psz); -wxString WXDLLEXPORT operator+(const wxChar *psz, const wxString& string); +wxString WXDLLEXPORT_BASE operator+(const wxString& string1, const wxString& string2); +wxString WXDLLEXPORT_BASE operator+(const wxString& string, wxChar ch); +wxString WXDLLEXPORT_BASE operator+(wxChar ch, const wxString& string); +wxString WXDLLEXPORT_BASE operator+(const wxString& string, const wxChar *psz); +wxString WXDLLEXPORT_BASE operator+(const wxChar *psz, const wxString& string); #if wxUSE_UNICODE inline wxString operator+(const wxString& string, const wxWCharBuffer& buf) { return string + (const wchar_t *)buf; } @@ -1277,8 +1277,8 @@ inline wxString operator+(const wxCharBuffer& buf, const wxString& string) #include "wx/iosfwrap.h" -WXDLLEXPORT wxSTD istream& operator>>(wxSTD istream&, wxString&); -WXDLLEXPORT wxSTD ostream& operator<<(wxSTD ostream&, const wxString&); +WXDLLEXPORT_BASE wxSTD istream& operator>>(wxSTD istream&, wxString&); +WXDLLEXPORT_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxString&); #endif // wxSTD_STRING_COMPATIBILITY diff --git a/include/wx/sysopt.h b/include/wx/sysopt.h index efc394e9c6..a82a37a12e 100644 --- a/include/wx/sysopt.h +++ b/include/wx/sysopt.h @@ -20,7 +20,7 @@ // Enables an application to influence the wxWindows implementation // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxSystemOptions : public wxObject +class WXDLLEXPORT_BASE wxSystemOptions : public wxObject { public: wxSystemOptions() { } diff --git a/include/wx/textbuf.h b/include/wx/textbuf.h index 71a72d4c70..fe89c69b4f 100644 --- a/include/wx/textbuf.h +++ b/include/wx/textbuf.h @@ -46,7 +46,7 @@ WX_DEFINE_EXPORTED_ARRAY_INT(wxTextFileType, ArrayFileType); #endif // wxUSE_TEXTBUFFER -class WXDLLEXPORT wxTextBuffer +class WXDLLEXPORT_BASE wxTextBuffer { public: // constants and static functions diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index c43869e819..67373c7db3 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -53,7 +53,6 @@ class WXDLLEXPORT wxTextCtrlBase; // ---------------------------------------------------------------------------- WXDLLEXPORT_DATA(extern const wxChar*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; // ---------------------------------------------------------------------------- // wxTextCtrl style flags diff --git a/include/wx/textfile.h b/include/wx/textfile.h index 693bd37d96..8da6e31ffa 100644 --- a/include/wx/textfile.h +++ b/include/wx/textfile.h @@ -30,7 +30,7 @@ // wxTextFile // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTextFile : public wxTextBuffer +class WXDLLEXPORT_BASE wxTextFile : public wxTextBuffer { public: // constructors diff --git a/include/wx/tokenzr.h b/include/wx/tokenzr.h index 2090ba7889..9cdcffe072 100644 --- a/include/wx/tokenzr.h +++ b/include/wx/tokenzr.h @@ -41,7 +41,7 @@ enum wxStringTokenizerMode // wxStringTokenizer: replaces infamous strtok() and has some other features // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStringTokenizer : public wxObject +class WXDLLEXPORT_BASE wxStringTokenizer : public wxObject { public: // ctors and initializers @@ -123,7 +123,7 @@ protected: // the function takes the same parameters as wxStringTokenizer ctor and returns // the array containing all tokens -wxArrayString WXDLLEXPORT +wxArrayString WXDLLEXPORT_BASE wxStringTokenize(const wxString& str, const wxString& delims = wxDEFAULT_DELIMITERS, wxStringTokenizerMode mode = wxTOKEN_DEFAULT); diff --git a/include/wx/txtstrm.h b/include/wx/txtstrm.h index 145257697e..1f5c68b45c 100644 --- a/include/wx/txtstrm.h +++ b/include/wx/txtstrm.h @@ -20,16 +20,16 @@ #if wxUSE_STREAMS -class WXDLLEXPORT wxTextInputStream; -class WXDLLEXPORT wxTextOutputStream; +class WXDLLEXPORT_BASE wxTextInputStream; +class WXDLLEXPORT_BASE wxTextOutputStream; typedef wxTextInputStream& (*__wxTextInputManip)(wxTextInputStream&); typedef wxTextOutputStream& (*__wxTextOutputManip)(wxTextOutputStream&); -WXDLLEXPORT wxTextOutputStream &endl( wxTextOutputStream &stream ); +WXDLLEXPORT_BASE wxTextOutputStream &endl( wxTextOutputStream &stream ); -class WXDLLEXPORT wxTextInputStream +class WXDLLEXPORT_BASE wxTextInputStream { public: #if wxUSE_UNICODE @@ -83,7 +83,7 @@ typedef enum wxEOL_DOS } wxEOL; -class WXDLLEXPORT wxTextOutputStream +class WXDLLEXPORT_BASE wxTextOutputStream { public: #if wxUSE_UNICODE diff --git a/include/wx/url.h b/include/wx/url.h index 9008fc12f4..794062ae72 100644 --- a/include/wx/url.h +++ b/include/wx/url.h @@ -37,7 +37,7 @@ typedef enum { wxURL_PROTOERR } wxURLError; -class WXDLLEXPORT wxURL : public wxObject +class WXDLLEXPORT_BASE wxURL : public wxObject { public: wxURL(const wxString& url); diff --git a/include/wx/utils.h b/include/wx/utils.h index d91baabc48..9adf2026ab 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -39,11 +39,11 @@ // Forward declaration // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxProcess; -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxWindowList; -class WXDLLEXPORT wxPoint; +class WXDLLEXPORT_BASE wxProcess; +class WXDLLEXPORT_BASE wxFrame; +class WXDLLEXPORT_BASE wxWindow; +class WXDLLEXPORT_BASE wxWindowList; +class WXDLLEXPORT_BASE wxPoint; // ---------------------------------------------------------------------------- // Macros @@ -59,15 +59,15 @@ class WXDLLEXPORT wxPoint; // Useful buffer (FIXME VZ: To be removed!!!) // Now only needed in MSW port #if !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) && !defined(__WXMGL__) && !defined(__WXMAC__) -WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; +WXDLLEXPORT_DATA_BASE(extern wxChar*) wxBuffer; #endif // Make a copy of this string using 'new' -WXDLLEXPORT wxChar* copystring(const wxChar *s); +WXDLLEXPORT_BASE wxChar* copystring(const wxChar *s); #if WXWIN_COMPATIBILITY_2 // Matches string one within string two regardless of case -WXDLLEXPORT bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE); +WXDLLEXPORT_BASE bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE); #endif // A shorter way of using strcmp @@ -78,22 +78,22 @@ WXDLLEXPORT bool StringMatch(const wxChar *one, const wxChar *two, bool subStrin // ---------------------------------------------------------------------------- // Sound the bell -WXDLLEXPORT void wxBell(); +WXDLLEXPORT_BASE void wxBell(); // Get OS description as a user-readable string -WXDLLEXPORT wxString wxGetOsDescription(); +WXDLLEXPORT_BASE wxString wxGetOsDescription(); // Get OS version -WXDLLEXPORT int wxGetOsVersion(int *majorVsn = (int *) NULL, +WXDLLEXPORT_BASE int wxGetOsVersion(int *majorVsn = (int *) NULL, int *minorVsn = (int *) NULL); // Return a string with the current date/time -WXDLLEXPORT wxString wxNow(); +WXDLLEXPORT_BASE wxString wxNow(); // Return path where wxWindows is installed (mostly useful in Unices) -WXDLLEXPORT const wxChar *wxGetInstallPrefix(); +WXDLLEXPORT_BASE const wxChar *wxGetInstallPrefix(); // Return path to wxWin data (/usr/share/wx/%{version}) (Unices) -WXDLLEXPORT wxString wxGetDataDir(); +WXDLLEXPORT_BASE wxString wxGetDataDir(); #if wxUSE_GUI @@ -130,26 +130,26 @@ WXDLLEXPORT long wxGetCurrentId(); // these functions are deprecated, use wxString methods instead! #if WXWIN_COMPATIBILITY_2_4 -WXDLLEXPORT_DATA(extern const wxChar*) wxFloatToStringStr; -WXDLLEXPORT_DATA(extern const wxChar*) wxDoubleToStringStr; +WXDLLEXPORT_DATA_BASE(extern const wxChar*) wxFloatToStringStr; +WXDLLEXPORT_DATA_BASE(extern const wxChar*) wxDoubleToStringStr; -WXDLLEXPORT void StringToFloat(const wxChar *s, float *number); -WXDLLEXPORT wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr); -WXDLLEXPORT void StringToDouble(const wxChar *s, double *number); -WXDLLEXPORT wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr); -WXDLLEXPORT void StringToInt(const wxChar *s, int *number); -WXDLLEXPORT void StringToLong(const wxChar *s, long *number); -WXDLLEXPORT wxChar* IntToString(int number); -WXDLLEXPORT wxChar* LongToString(long number); +WXDLLEXPORT_BASE void StringToFloat(const wxChar *s, float *number); +WXDLLEXPORT_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr); +WXDLLEXPORT_BASE void StringToDouble(const wxChar *s, double *number); +WXDLLEXPORT_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr); +WXDLLEXPORT_BASE void StringToInt(const wxChar *s, int *number); +WXDLLEXPORT_BASE void StringToLong(const wxChar *s, long *number); +WXDLLEXPORT_BASE wxChar* IntToString(int number); +WXDLLEXPORT_BASE wxChar* LongToString(long number); #endif // WXWIN_COMPATIBILITY_2_4 // Convert 2-digit hex number to decimal -WXDLLEXPORT int wxHexToDec(const wxString& buf); +WXDLLEXPORT_BASE int wxHexToDec(const wxString& buf); // Convert decimal integer to 2-character hex string -WXDLLEXPORT void wxDecToHex(int dec, wxChar *buf); -WXDLLEXPORT wxString wxDecToHex(int dec); +WXDLLEXPORT_BASE void wxDecToHex(int dec, wxChar *buf); +WXDLLEXPORT_BASE wxString wxDecToHex(int dec); // ---------------------------------------------------------------------------- // Process management @@ -180,18 +180,18 @@ enum // If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the // process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on // failure and the PID of the launched process if ok. -WXDLLEXPORT long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC, +WXDLLEXPORT_BASE long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); -WXDLLEXPORT long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, +WXDLLEXPORT_BASE long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); // execute the command capturing its output into an array line by line, this is // always synchronous -WXDLLEXPORT long wxExecute(const wxString& command, +WXDLLEXPORT_BASE long wxExecute(const wxString& command, wxArrayString& output); // also capture stderr (also synchronous) -WXDLLEXPORT long wxExecute(const wxString& command, +WXDLLEXPORT_BASE long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& error); @@ -234,38 +234,38 @@ enum wxShutdownFlags }; // Shutdown or reboot the PC -WXDLLEXPORT bool wxShutdown(wxShutdownFlags wFlags); +WXDLLEXPORT_BASE bool wxShutdown(wxShutdownFlags wFlags); // send the given signal to the process (only NONE and KILL are supported under // Windows, all others mean TERM), return 0 if ok and -1 on error // // return detailed error in rc if not NULL -WXDLLEXPORT int wxKill(long pid, +WXDLLEXPORT_BASE int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL); // Execute a command in an interactive shell window (always synchronously) // If no command then just the shell -WXDLLEXPORT bool wxShell(const wxString& command = wxEmptyString); +WXDLLEXPORT_BASE bool wxShell(const wxString& command = wxEmptyString); // As wxShell(), but must give a (non interactive) command and its output will // be returned in output array -WXDLLEXPORT bool wxShell(const wxString& command, wxArrayString& output); +WXDLLEXPORT_BASE bool wxShell(const wxString& command, wxArrayString& output); // Sleep for nSecs seconds -WXDLLEXPORT void wxSleep(int nSecs); +WXDLLEXPORT_BASE void wxSleep(int nSecs); // Sleep for a given amount of milliseconds -WXDLLEXPORT void wxUsleep(unsigned long milliseconds); +WXDLLEXPORT_BASE void wxUsleep(unsigned long milliseconds); // Get the process id of the current process -WXDLLEXPORT unsigned long wxGetProcessId(); +WXDLLEXPORT_BASE unsigned long wxGetProcessId(); // Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX) -WXDLLEXPORT long wxGetFreeMemory(); +WXDLLEXPORT_BASE long wxGetFreeMemory(); // should wxApp::OnFatalException() be called? -WXDLLEXPORT bool wxHandleFatalExceptions(bool doit = TRUE); +WXDLLEXPORT_BASE bool wxHandleFatalExceptions(bool doit = TRUE); // ---------------------------------------------------------------------------- // Environment variables @@ -273,10 +273,10 @@ WXDLLEXPORT bool wxHandleFatalExceptions(bool doit = TRUE); // returns TRUE if variable exists (value may be NULL if you just want to check // for this) -WXDLLEXPORT bool wxGetEnv(const wxString& var, wxString *value); +WXDLLEXPORT_BASE bool wxGetEnv(const wxString& var, wxString *value); // set the env var name to the given value, return TRUE on success -WXDLLEXPORT bool wxSetEnv(const wxString& var, const wxChar *value); +WXDLLEXPORT_BASE bool wxSetEnv(const wxString& var, const wxChar *value); // remove the env var from environment inline bool wxUnsetEnv(const wxString& var) { return wxSetEnv(var, NULL); } @@ -288,39 +288,39 @@ inline bool wxUnsetEnv(const wxString& var) { return wxSetEnv(var, NULL); } // NB: "char *" functions are deprecated, use wxString ones! // Get eMail address -WXDLLEXPORT bool wxGetEmailAddress(wxChar *buf, int maxSize); -WXDLLEXPORT wxString wxGetEmailAddress(); +WXDLLEXPORT_BASE bool wxGetEmailAddress(wxChar *buf, int maxSize); +WXDLLEXPORT_BASE wxString wxGetEmailAddress(); // Get hostname. -WXDLLEXPORT bool wxGetHostName(wxChar *buf, int maxSize); -WXDLLEXPORT wxString wxGetHostName(); +WXDLLEXPORT_BASE bool wxGetHostName(wxChar *buf, int maxSize); +WXDLLEXPORT_BASE wxString wxGetHostName(); // Get FQDN -WXDLLEXPORT wxString wxGetFullHostName(); -WXDLLEXPORT bool wxGetFullHostName(wxChar *buf, int maxSize); +WXDLLEXPORT_BASE wxString wxGetFullHostName(); +WXDLLEXPORT_BASE bool wxGetFullHostName(wxChar *buf, int maxSize); // Get user ID e.g. jacs (this is known as login name under Unix) -WXDLLEXPORT bool wxGetUserId(wxChar *buf, int maxSize); -WXDLLEXPORT wxString wxGetUserId(); +WXDLLEXPORT_BASE bool wxGetUserId(wxChar *buf, int maxSize); +WXDLLEXPORT_BASE wxString wxGetUserId(); // Get user name e.g. Julian Smart -WXDLLEXPORT bool wxGetUserName(wxChar *buf, int maxSize); -WXDLLEXPORT wxString wxGetUserName(); +WXDLLEXPORT_BASE bool wxGetUserName(wxChar *buf, int maxSize); +WXDLLEXPORT_BASE wxString wxGetUserName(); // Get current Home dir and copy to dest (returns pstr->c_str()) -WXDLLEXPORT wxString wxGetHomeDir(); -WXDLLEXPORT const wxChar* wxGetHomeDir(wxString *pstr); +WXDLLEXPORT_BASE wxString wxGetHomeDir(); +WXDLLEXPORT_BASE const wxChar* wxGetHomeDir(wxString *pstr); // Get the user's home dir (caller must copy --- volatile) // returns NULL is no HOME dir is known #if defined(__UNIX__) && wxUSE_UNICODE -WXDLLEXPORT const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString); +WXDLLEXPORT_BASE const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString); #else -WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString); +WXDLLEXPORT_BASE wxChar* wxGetUserHome(const wxString& user = wxEmptyString); #endif // get number of total/free bytes on the disk where path belongs -WXDLLEXPORT bool wxGetDiskSpace(const wxString& path, +WXDLLEXPORT_BASE bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal = NULL, wxLongLong *pFree = NULL); @@ -366,14 +366,6 @@ WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent // Message/event queue helpers // ---------------------------------------------------------------------------- -// NB: these functions are obsolete, please use wxApp methods instead! - -// Yield to other apps/messages -WXDLLEXPORT bool wxYield(); - -// Like wxYield, but fails silently if the yield is recursive. -WXDLLEXPORT bool wxYieldIfNeeded(); - // Yield to other apps/messages and disable user input WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = FALSE); @@ -489,6 +481,16 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); #endif // wxUSE_GUI +// ---------------------------------------------------------------------------- +// wxYield(): these functions are obsolete, please use wxApp methods instead! +// ---------------------------------------------------------------------------- + +// Yield to other apps/messages +WXDLLEXPORT_BASE bool wxYield(); + +// Like wxYield, but fails silently if the yield is recursive. +WXDLLEXPORT_BASE bool wxYieldIfNeeded(); + // ---------------------------------------------------------------------------- // Error message functions used by wxWindows (deprecated, use wxLog) // ---------------------------------------------------------------------------- @@ -497,15 +499,15 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); // Format a message on the standard error (UNIX) or the debugging // stream (Windows) -WXDLLEXPORT void wxDebugMsg(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1; +WXDLLEXPORT_BASE void wxDebugMsg(const wxChar *fmt ...) ATTRIBUTE_PRINTF_1; // Non-fatal error (continues) -WXDLLEXPORT_DATA(extern const wxChar*) wxInternalErrorStr; -WXDLLEXPORT void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); +WXDLLEXPORT_DATA_BASE(extern const wxChar*) wxInternalErrorStr; +WXDLLEXPORT_BASE void wxError(const wxString& msg, const wxString& title = wxInternalErrorStr); // Fatal error (exits) -WXDLLEXPORT_DATA(extern const wxChar*) wxFatalErrorStr; -WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); +WXDLLEXPORT_DATA_BASE(extern const wxChar*) wxFatalErrorStr; +WXDLLEXPORT_BASE void wxFatalError(const wxString& msg, const wxString& title = wxFatalErrorStr); #endif // WXWIN_COMPATIBILITY_2_2 diff --git a/include/wx/variant.h b/include/wx/variant.h index 7c1b224c80..f31d4db9bc 100644 --- a/include/wx/variant.h +++ b/include/wx/variant.h @@ -45,7 +45,7 @@ * overloading wxVariant with unnecessary functionality. */ -class WXDLLEXPORT wxVariantData: public wxObject +class WXDLLEXPORT_BASE wxVariantData: public wxObject { DECLARE_ABSTRACT_CLASS(wxVariantData) public: @@ -79,7 +79,7 @@ public: * this class too much. */ -class WXDLLEXPORT wxVariant: public wxObject +class WXDLLEXPORT_BASE wxVariant: public wxObject { DECLARE_DYNAMIC_CLASS(wxVariant) public: @@ -284,7 +284,7 @@ protected: ((classname*)(var.IsValueKindOf(&classname::sm_class##classname) ?\ var.GetWxObjectPtr() : NULL)); -extern wxVariant WXDLLEXPORT wxNullVariant; +extern wxVariant WXDLLEXPORT_BASE wxNullVariant; #endif // _WX_VARIANT_H_ diff --git a/include/wx/vector.h b/include/wx/vector.h index 36bb252b17..fc98b22fbc 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -13,7 +13,7 @@ #include "wx/defs.h" -class WXDLLEXPORT wxVectorBase +class WXDLLEXPORT_BASE wxVectorBase { public: typedef size_t size_type; diff --git a/include/wx/volume.h b/include/wx/volume.h index b54a945940..62406e7591 100644 --- a/include/wx/volume.h +++ b/include/wx/volume.h @@ -52,7 +52,7 @@ enum wxFSVolumeKind wxFS_VOL_MAX }; -class WXDLLEXPORT wxFSVolumeBase +class WXDLLEXPORT_BASE wxFSVolumeBase { public: // return the array containing the names of the volumes diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index de639c6262..73f38385b2 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -30,7 +30,7 @@ // wxFileStream using wxFile // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileInputStream: public wxInputStream { +class WXDLLEXPORT_BASE wxFileInputStream: public wxInputStream { public: wxFileInputStream(const wxString& ifileName); wxFileInputStream(wxFile& file); @@ -55,7 +55,7 @@ class WXDLLEXPORT wxFileInputStream: public wxInputStream { DECLARE_NO_COPY_CLASS(wxFileInputStream) }; -class WXDLLEXPORT wxFileOutputStream: public wxOutputStream { +class WXDLLEXPORT_BASE wxFileOutputStream: public wxOutputStream { public: wxFileOutputStream(const wxString& fileName); wxFileOutputStream(wxFile& file); @@ -85,7 +85,7 @@ class WXDLLEXPORT wxFileOutputStream: public wxOutputStream { DECLARE_NO_COPY_CLASS(wxFileOutputStream) }; -class WXDLLEXPORT wxFileStream: public wxFileInputStream, public wxFileOutputStream { +class WXDLLEXPORT_BASE wxFileStream: public wxFileInputStream, public wxFileOutputStream { public: wxFileStream(const wxString& fileName); }; @@ -94,7 +94,7 @@ class WXDLLEXPORT wxFileStream: public wxFileInputStream, public wxFileOutputStr // wxFFileStream using wxFFile // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFFileInputStream: public wxInputStream { +class WXDLLEXPORT_BASE wxFFileInputStream: public wxInputStream { public: wxFFileInputStream(const wxString& ifileName); wxFFileInputStream(wxFFile& file); @@ -119,7 +119,7 @@ class WXDLLEXPORT wxFFileInputStream: public wxInputStream { DECLARE_NO_COPY_CLASS(wxFFileInputStream) }; -class WXDLLEXPORT wxFFileOutputStream: public wxOutputStream { +class WXDLLEXPORT_BASE wxFFileOutputStream: public wxOutputStream { public: wxFFileOutputStream(const wxString& fileName); wxFFileOutputStream(wxFFile& file); @@ -149,7 +149,7 @@ class WXDLLEXPORT wxFFileOutputStream: public wxOutputStream { DECLARE_NO_COPY_CLASS(wxFFileOutputStream) }; -class WXDLLEXPORT wxFFileStream: public wxFFileInputStream, public wxFFileOutputStream { +class WXDLLEXPORT_BASE wxFFileStream: public wxFFileInputStream, public wxFFileOutputStream { public: wxFFileStream(const wxString& fileName); }; diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index c6665ef5e5..ea24fe0bfb 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -679,7 +679,7 @@ inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; } #define wxStrdup wxStrdupA #endif -WXDLLEXPORT bool wxOKlibc(); // for internal use +WXDLLEXPORT_BASE bool wxOKlibc(); // for internal use // ---------------------------------------------------------------------------- // printf() family saga @@ -728,11 +728,11 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use #ifndef wxSnprintf_ // no [v]snprintf(), cook our own - WXDLLEXPORT int wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, + WXDLLEXPORT_BASE int wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...) ATTRIBUTE_PRINTF_3; #endif #ifndef wxVsnprintf_ - WXDLLEXPORT int wxVsnprintf_(wxChar *buf, size_t len, const wxChar *format, + WXDLLEXPORT_BASE int wxVsnprintf_(wxChar *buf, size_t len, const wxChar *format, va_list argptr); #endif @@ -801,19 +801,19 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use // // VZ: note that this is never defined currently #ifdef wxNEED_WX_CTYPE_H - WXDLLEXPORT int wxIsalnum(wxChar ch); - WXDLLEXPORT int wxIsalpha(wxChar ch); - WXDLLEXPORT int wxIsctrl(wxChar ch); - WXDLLEXPORT int wxIsdigit(wxChar ch); - WXDLLEXPORT int wxIsgraph(wxChar ch); - WXDLLEXPORT int wxIslower(wxChar ch); - WXDLLEXPORT int wxIsprint(wxChar ch); - WXDLLEXPORT int wxIspunct(wxChar ch); - WXDLLEXPORT int wxIsspace(wxChar ch); - WXDLLEXPORT int wxIsupper(wxChar ch); - WXDLLEXPORT int wxIsxdigit(wxChar ch); - WXDLLEXPORT int wxTolower(wxChar ch); - WXDLLEXPORT int wxToupper(wxChar ch); + WXDLLEXPORT_BASE int wxIsalnum(wxChar ch); + WXDLLEXPORT_BASE int wxIsalpha(wxChar ch); + WXDLLEXPORT_BASE int wxIsctrl(wxChar ch); + WXDLLEXPORT_BASE int wxIsdigit(wxChar ch); + WXDLLEXPORT_BASE int wxIsgraph(wxChar ch); + WXDLLEXPORT_BASE int wxIslower(wxChar ch); + WXDLLEXPORT_BASE int wxIsprint(wxChar ch); + WXDLLEXPORT_BASE int wxIspunct(wxChar ch); + WXDLLEXPORT_BASE int wxIsspace(wxChar ch); + WXDLLEXPORT_BASE int wxIsupper(wxChar ch); + WXDLLEXPORT_BASE int wxIsxdigit(wxChar ch); + WXDLLEXPORT_BASE int wxTolower(wxChar ch); + WXDLLEXPORT_BASE int wxToupper(wxChar ch); #endif // wxNEED_WX_CTYPE_H // under VC++ 6.0 isspace() returns 1 for 8 bit chars which completely breaks @@ -828,66 +828,66 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use // // VZ: this is never defined neither currently #ifdef wxNEED_WX_STRING_H - WXDLLEXPORT wxChar * wxStrcat(wxChar *dest, const wxChar *src); - WXDLLEXPORT const wxChar * wxStrchr(const wxChar *s, wxChar c); - WXDLLEXPORT wxChar * wxStrchr(wxChar *s, wxChar c) + WXDLLEXPORT_BASE wxChar * wxStrcat(wxChar *dest, const wxChar *src); + WXDLLEXPORT_BASE const wxChar * wxStrchr(const wxChar *s, wxChar c); + WXDLLEXPORT_BASE wxChar * wxStrchr(wxChar *s, wxChar c) { return (wxChar *)wxStrchr((const wxChar *)s, c); } - WXDLLEXPORT int wxStrcmp(const wxChar *s1, const wxChar *s2); - WXDLLEXPORT int wxStrcoll(const wxChar *s1, const wxChar *s2); - WXDLLEXPORT wxChar * wxStrcpy(wxChar *dest, const wxChar *src); - WXDLLEXPORT size_t wxStrcspn(const wxChar *s, const wxChar *reject); - WXDLLEXPORT size_t wxStrlen(const wxChar *s); - WXDLLEXPORT wxChar * wxStrncat(wxChar *dest, const wxChar *src, size_t n); - WXDLLEXPORT int wxStrncmp(const wxChar *s1, const wxChar *s2, size_t n); - WXDLLEXPORT wxChar * wxStrncpy(wxChar *dest, const wxChar *src, size_t n); - WXDLLEXPORT const wxChar * wxStrpbrk(const wxChar *s, const wxChar *accept); - WXDLLEXPORT wxChar * wxStrpbrk(wxChar *s, const wxChar *accept) + WXDLLEXPORT_BASE int wxStrcmp(const wxChar *s1, const wxChar *s2); + WXDLLEXPORT_BASE int wxStrcoll(const wxChar *s1, const wxChar *s2); + WXDLLEXPORT_BASE wxChar * wxStrcpy(wxChar *dest, const wxChar *src); + WXDLLEXPORT_BASE size_t wxStrcspn(const wxChar *s, const wxChar *reject); + WXDLLEXPORT_BASE size_t wxStrlen(const wxChar *s); + WXDLLEXPORT_BASE wxChar * wxStrncat(wxChar *dest, const wxChar *src, size_t n); + WXDLLEXPORT_BASE int wxStrncmp(const wxChar *s1, const wxChar *s2, size_t n); + WXDLLEXPORT_BASE wxChar * wxStrncpy(wxChar *dest, const wxChar *src, size_t n); + WXDLLEXPORT_BASE const wxChar * wxStrpbrk(const wxChar *s, const wxChar *accept); + WXDLLEXPORT_BASE wxChar * wxStrpbrk(wxChar *s, const wxChar *accept) { return (wxChar *)wxStrpbrk((const wxChar *)s, accept); } - WXDLLEXPORT const wxChar * wxStrrchr(const wxChar *s, wxChar c); - WXDLLEXPORT wxChar * wxStrrchr(wxChar *s, wxChar c) + WXDLLEXPORT_BASE const wxChar * wxStrrchr(const wxChar *s, wxChar c); + WXDLLEXPORT_BASE wxChar * wxStrrchr(wxChar *s, wxChar c) { return (wxChar *)wxStrrchr((const wxChar *)s, c); } - WXDLLEXPORT size_t wxStrspn(const wxChar *s, const wxChar *accept); - WXDLLEXPORT const wxChar * wxStrstr(const wxChar *haystack, const wxChar *needle); - WXDLLEXPORT wxChar *wxStrstr(wxChar *haystack, const wxChar *needle) + WXDLLEXPORT_BASE size_t wxStrspn(const wxChar *s, const wxChar *accept); + WXDLLEXPORT_BASE const wxChar * wxStrstr(const wxChar *haystack, const wxChar *needle); + WXDLLEXPORT_BASE wxChar *wxStrstr(wxChar *haystack, const wxChar *needle) { return (wxChar *)wxStrstr((const wxChar *)haystack, needle); } - WXDLLEXPORT double wxStrtod(const wxChar *nptr, wxChar **endptr); - WXDLLEXPORT long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base); - WXDLLEXPORT unsigned long int wxStrtoul(const wxChar *nptr, wxChar **endptr, int base); - WXDLLEXPORT size_t wxStrxfrm(wxChar *dest, const wxChar *src, size_t n); + WXDLLEXPORT_BASE double wxStrtod(const wxChar *nptr, wxChar **endptr); + WXDLLEXPORT_BASE long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base); + WXDLLEXPORT_BASE unsigned long int wxStrtoul(const wxChar *nptr, wxChar **endptr, int base); + WXDLLEXPORT_BASE size_t wxStrxfrm(wxChar *dest, const wxChar *src, size_t n); #endif // wxNEED_WX_STRING_H #ifndef wxStrdupA -WXDLLEXPORT char *wxStrdupA(const char *psz); +WXDLLEXPORT_BASE char *wxStrdupA(const char *psz); #endif #ifndef wxStrdupW -WXDLLEXPORT wchar_t *wxStrdupW(const wchar_t *pwz); +WXDLLEXPORT_BASE wchar_t *wxStrdupW(const wchar_t *pwz); #endif #ifndef wxStricmp -WXDLLEXPORT int wxStricmp(const wxChar *psz1, const wxChar *psz2); +WXDLLEXPORT_BASE int wxStricmp(const wxChar *psz1, const wxChar *psz2); #endif #ifndef wxStrnicmp -WXDLLEXPORT int wxStrnicmp(const wxChar *psz1, const wxChar *psz2, size_t len); +WXDLLEXPORT_BASE int wxStrnicmp(const wxChar *psz1, const wxChar *psz2, size_t len); #endif #ifndef wxStrtok -WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr); +WXDLLEXPORT_BASE wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr); #endif #ifndef wxSetlocale -class WXDLLEXPORT wxWCharBuffer; -WXDLLEXPORT wxWCharBuffer wxSetlocale(int category, const wxChar *locale); +class WXDLLEXPORT_BASE wxWCharBuffer; +WXDLLEXPORT_BASE wxWCharBuffer wxSetlocale(int category, const wxChar *locale); #endif // stdio.h functions #ifdef wxNEED_WX_STDIO_H #include - WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode); - WXDLLEXPORT FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream); - WXDLLEXPORT int wxRemove(const wxChar *path); - WXDLLEXPORT int wxRename(const wxChar *oldpath, const wxChar *newpath); + WXDLLEXPORT_BASE FILE * wxFopen(const wxChar *path, const wxChar *mode); + WXDLLEXPORT_BASE FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream); + WXDLLEXPORT_BASE int wxRemove(const wxChar *path); + WXDLLEXPORT_BASE int wxRename(const wxChar *oldpath, const wxChar *newpath); // *printf() family is handled separately #endif // wxNEED_WX_STDIO_H @@ -895,14 +895,14 @@ WXDLLEXPORT wxWCharBuffer wxSetlocale(int category, const wxChar *locale); // stdlib.h functions #ifndef wxAtof -WXDLLEXPORT double wxAtof(const wxChar *psz); +WXDLLEXPORT_BASE double wxAtof(const wxChar *psz); #endif #ifdef wxNEED_WX_STDLIB_H -WXDLLEXPORT int wxAtoi(const wxChar *psz); -WXDLLEXPORT long wxAtol(const wxChar *psz); -WXDLLEXPORT wxChar * wxGetenv(const wxChar *name); -WXDLLEXPORT int wxSystem(const wxChar *psz); +WXDLLEXPORT_BASE int wxAtoi(const wxChar *psz); +WXDLLEXPORT_BASE long wxAtol(const wxChar *psz); +WXDLLEXPORT_BASE wxChar * wxGetenv(const wxChar *name); +WXDLLEXPORT_BASE int wxSystem(const wxChar *psz); #endif @@ -911,7 +911,7 @@ WXDLLEXPORT int wxSystem(const wxChar *psz); #if defined(__MWERKS__) && defined(macintosh) #include #endif - WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, + WXDLLEXPORT_BASE size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const struct tm *tm); #endif // wxNEED_WX_TIME_H @@ -921,8 +921,8 @@ WXDLLEXPORT int wxSystem(const wxChar *psz); #if wxUSE_WCHAR_T // multibyte<->widechar conversion - WXDLLEXPORT size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n); - WXDLLEXPORT size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n); + WXDLLEXPORT_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n); + WXDLLEXPORT_BASE size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n); #if wxUSE_UNICODE #define wxMB2WX wxMB2WC diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index 77236c3f63..665f270f45 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -26,7 +26,7 @@ //-------------------------------------------------------------------------------- -class WXDLLEXPORT wxZipInputStream : public wxInputStream +class WXDLLEXPORT_BASE wxZipInputStream : public wxInputStream { public: wxZipInputStream(const wxString& archive, const wxString& file); diff --git a/include/wx/zstream.h b/include/wx/zstream.h index 2bbeb2fc52..26ac4b14ab 100644 --- a/include/wx/zstream.h +++ b/include/wx/zstream.h @@ -21,7 +21,7 @@ #include "wx/stream.h" -class WXDLLEXPORT wxZlibInputStream: public wxFilterInputStream { +class WXDLLEXPORT_BASE wxZlibInputStream: public wxFilterInputStream { public: wxZlibInputStream(wxInputStream& stream); virtual ~wxZlibInputStream(); @@ -37,7 +37,7 @@ class WXDLLEXPORT wxZlibInputStream: public wxFilterInputStream { DECLARE_NO_COPY_CLASS(wxZlibInputStream) }; -class WXDLLEXPORT wxZlibOutputStream: public wxFilterOutputStream { +class WXDLLEXPORT_BASE wxZlibOutputStream: public wxFilterOutputStream { public: wxZlibOutputStream(wxOutputStream& stream, int level = -1); virtual ~wxZlibOutputStream(); diff --git a/src/common/event.cpp b/src/common/event.cpp index 1b259b8126..0c9cac8de1 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -125,6 +125,17 @@ const wxEventType wxEVT_FIRST = 10000; const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000; DEFINE_EVENT_TYPE(wxEVT_NULL) +DEFINE_EVENT_TYPE(wxEVT_IDLE) +DEFINE_EVENT_TYPE(wxEVT_SOCKET) + +#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES + +#endif // wxUSE_BASE + +#if wxUSE_GUI + +#if !WXWIN_COMPATIBILITY_EVENT_TYPES + DEFINE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_CHECKBOX_CLICKED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_CHOICE_SELECTED) @@ -143,7 +154,6 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER) DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED) // Sockets and timers send events, too -DEFINE_EVENT_TYPE(wxEVT_SOCKET) DEFINE_EVENT_TYPE(wxEVT_TIMER) // Mouse event types @@ -248,7 +258,6 @@ DEFINE_EVENT_TYPE(wxEVT_DRAW_ITEM) DEFINE_EVENT_TYPE(wxEVT_MEASURE_ITEM) DEFINE_EVENT_TYPE(wxEVT_COMPARE_ITEM) DEFINE_EVENT_TYPE(wxEVT_INIT_DIALOG) -DEFINE_EVENT_TYPE(wxEVT_IDLE) DEFINE_EVENT_TYPE(wxEVT_UPDATE_UI) // Generic command events @@ -267,6 +276,10 @@ DEFINE_EVENT_TYPE(wxEVT_DETAILED_HELP) #endif // !WXWIN_COMPATIBILITY_EVENT_TYPES +#endif // wxUSE_GUI + +#if wxUSE_BASE + // ============================================================================ // implementation // ============================================================================ diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 5696d2a998..b05fabe17c 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -118,7 +118,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, encoding = wxFont::GetDefaultEncoding(); } - extern long wxEncodingToCharset(wxFontEncoding encoding); + extern WXDLLEXPORT_BASE long wxEncodingToCharset(wxFontEncoding encoding); info->charset = wxEncodingToCharset(encoding); if ( info->charset == -1 ) return FALSE; diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index c0f5e6a304..c9111fbda5 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -682,7 +682,10 @@ bool wxRegKey::DeleteValue(const wxChar *szValue) #if defined(__WIN32__) m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue); - if ( m_dwLastError != ERROR_SUCCESS ) { + + // deleting a value which doesn't exist is not considered an error + if ( (m_dwLastError != ERROR_SUCCESS) && + (m_dwLastError != ERROR_FILE_NOT_FOUND) ) { wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"), szValue, GetName().c_str()); return FALSE; diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index e6e9e3fae8..618d3b9310 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -565,7 +565,8 @@ DWORD CALLBACK wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb) return 0; } -extern long wxEncodingToCodepage(wxFontEncoding encoding); // from utils.cpp +// from utils.cpp +extern WXDLLEXPORT_BASE long wxEncodingToCodepage(wxFontEncoding encoding); #if wxUSE_UNICODE_MSLU bool wxTextCtrl::StreamIn(const wxString& value, diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index fa53d48b90..df08475ba1 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1049,7 +1049,7 @@ void wxSleep(int nSecs) // font encoding <-> Win32 codepage conversion functions // ---------------------------------------------------------------------------- -extern long wxEncodingToCharset(wxFontEncoding encoding) +extern WXDLLEXPORT_BASE long wxEncodingToCharset(wxFontEncoding encoding) { switch ( encoding ) { @@ -1120,7 +1120,7 @@ extern long wxEncodingToCharset(wxFontEncoding encoding) #include "wx/fontmap.h" -extern long wxEncodingToCodepage(wxFontEncoding encoding) +extern WXDLLEXPORT_BASE long wxEncodingToCodepage(wxFontEncoding encoding) { // translate encoding into the Windows CHARSET long charset = wxEncodingToCharset(encoding); -- 2.47.2