From ea88e9bca944a356a909297ada0496f88f2f75c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 15 Jul 2007 08:10:29 +0000 Subject: [PATCH] don't export private stc2wx(), wx2stc() functions from wxSTC shared library git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/stc/private.h | 40 ++++++++++++++++++++++++++++++++++++++++ include/wx/stc/stc.h | 34 ++++------------------------------ src/stc/PlatWX.cpp | 1 + src/stc/ScintillaWX.cpp | 1 + src/stc/stc.cpp | 1 + src/stc/stc.h.in | 34 ++++------------------------------ 6 files changed, 51 insertions(+), 60 deletions(-) create mode 100644 include/wx/stc/private.h diff --git a/include/wx/stc/private.h b/include/wx/stc/private.h new file mode 100644 index 0000000000..976e946676 --- /dev/null +++ b/include/wx/stc/private.h @@ -0,0 +1,40 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: wx/stc/private.h +// Purpose: Private declarations for wxSTC +// Author: Robin Dunn +// Created: 2007-07-15 +// RCS-ID: $Id$ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_STC_PRIVATE_H_ +#define _WX_STC_PRIVATE_H_ + +#include "wx/defs.h" +#include "wx/string.h" + +//---------------------------------------------------------------------- +// Utility functions used within wxSTC + +#if wxUSE_UNICODE + +extern wxString stc2wx(const char* str); +extern wxString stc2wx(const char* str, size_t len); +extern const wxWX2MBbuf wx2stc(const wxString& str); + +#else // not UNICODE + +inline wxString stc2wx(const char* str) { + return wxString(str); +} +inline wxString stc2wx(const char* str, size_t len) { + return wxString(str, len); +} +inline const wxWX2MBbuf wx2stc(const wxString& str) { + return str.mbc_str(); +} + +#endif // UNICODE + +#endif // _WX_STC_PRIVATE_H_ diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index c36ca88671..1217ebace4 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -17,8 +17,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __stc_h__ -#define __stc_h__ +#ifndef _WX_STC_STC_H_ +#define _WX_STC_STC_H_ #include "wx/defs.h" @@ -3586,32 +3586,6 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), #endif -//---------------------------------------------------------------------- -// Utility functions used within wxSTC - -#ifndef SWIG -#if wxUSE_UNICODE - -WXDLLIMPEXP_STC wxString stc2wx(const char* str); -WXDLLIMPEXP_STC wxString stc2wx(const char* str, size_t len); -WXDLLIMPEXP_STC const wxWX2MBbuf wx2stc(const wxString& str); - -#else // not UNICODE - -inline wxString stc2wx(const char* str) { - return wxString(str); -} -inline wxString stc2wx(const char* str, size_t len) { - return wxString(str, len); -} -inline const wxWX2MBbuf wx2stc(const wxString& str) { - return str.mbc_str(); -} - -#endif // UNICODE -#endif // SWIG - -//---------------------------------------------------------------------- -#endif - #endif // wxUSE_STC + +#endif // _WX_STC_STC_H_ diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index d219e12cb1..153de8cc57 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -35,6 +35,7 @@ #include "Platform.h" #include "PlatWX.h" #include "wx/stc/stc.h" +#include "wx/stc/private.h" diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 5f613664d8..2f27b51b6f 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -36,6 +36,7 @@ #include "ScintillaWX.h" #include "ExternalLexer.h" #include "wx/stc/stc.h" +#include "wx/stc/private.h" #include "PlatWX.h" #ifdef __WXMSW__ diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 5f72b1de71..dda75ca9d3 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -25,6 +25,7 @@ #if wxUSE_STC #include "wx/stc/stc.h" +#include "wx/stc/private.h" #ifndef WX_PRECOMP #include "wx/wx.h" diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 66686107c9..5630c3229d 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -17,8 +17,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __stc_h__ -#define __stc_h__ +#ifndef _WX_STC_STC_H_ +#define _WX_STC_STC_H_ #include "wx/defs.h" @@ -516,32 +516,6 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), #endif -//---------------------------------------------------------------------- -// Utility functions used within wxSTC - -#ifndef SWIG -#if wxUSE_UNICODE - -WXDLLIMPEXP_STC wxString stc2wx(const char* str); -WXDLLIMPEXP_STC wxString stc2wx(const char* str, size_t len); -WXDLLIMPEXP_STC const wxWX2MBbuf wx2stc(const wxString& str); - -#else // not UNICODE - -inline wxString stc2wx(const char* str) { - return wxString(str); -} -inline wxString stc2wx(const char* str, size_t len) { - return wxString(str, len); -} -inline const wxWX2MBbuf wx2stc(const wxString& str) { - return str.mbc_str(); -} - -#endif // UNICODE -#endif // SWIG - -//---------------------------------------------------------------------- -#endif - #endif // wxUSE_STC + +#endif // _WX_STC_STC_H_ -- 2.45.2