Add buffer
This commit is contained in:
parent
3397f151c5
commit
9f667f8801
4 changed files with 8 additions and 51 deletions
|
|
@ -19,5 +19,5 @@ mkdir -p $SHAREDLIBS_DIR
|
||||||
|
|
||||||
|
|
||||||
swig -c++ -c -cpperraswarn -nocxx -o "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" $WX_CONFIG $(wx-config --cxxflags all) $MOD_PATH
|
swig -c++ -c -cpperraswarn -nocxx -o "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" $WX_CONFIG $(wx-config --cxxflags all) $MOD_PATH
|
||||||
clang++ -c "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" -o "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" -I$TEMPLATE_DIR -I. $WX_CONFIG $(wx-config --cxxflags all)
|
clang++ -O2 -c "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" -o "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" -I$TEMPLATE_DIR -I. $WX_CONFIG $(wx-config --cxxflags all)
|
||||||
clang++ -shared -o "${SHAREDLIBS_DIR}/lib${MOD_NAME}.so" "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" $(wx-config --libs all)
|
clang++ -O2 -shared -o "${SHAREDLIBS_DIR}/lib${MOD_NAME}.so" "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" $(wx-config --libs all)
|
||||||
|
|
|
||||||
|
|
@ -1,53 +1,10 @@
|
||||||
%module buffer
|
%module buffer
|
||||||
%include <std_string.i>
|
%include <common.i>
|
||||||
%include <std_common.i>
|
|
||||||
%{
|
%{
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
|
#include <wx/buffer.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%define __arm64__ 1
|
|
||||||
%enddef
|
|
||||||
%define TARGET_CPU_ARM64 1
|
|
||||||
%enddef
|
|
||||||
%define __APPLE__ 1
|
|
||||||
%enddef
|
|
||||||
%define __LP64__ 1
|
|
||||||
%enddef
|
|
||||||
%define __MACH__ 1
|
|
||||||
%enddef
|
|
||||||
|
|
||||||
#define __FUNCTION__ (NULL)
|
|
||||||
#define __asm(str)
|
|
||||||
#define __attribute__(str)
|
|
||||||
|
|
||||||
/* #define WXEXPORT */
|
|
||||||
/* #define WXIMPORT */
|
|
||||||
%ignore WX_DECLARE_LIST_XO;
|
|
||||||
%ignore WX_DECLARE_LIST_2(elementtype, listname, nodename, classexp);
|
|
||||||
%ignore WX_DECLARE_LIST_3;
|
|
||||||
%ignore WX_DECLARE_LIST_4;
|
|
||||||
%ignore WXDLLIMPEXP_BASE;
|
|
||||||
%ignore _WX_LIST_HELPER_wxWindowList;
|
|
||||||
%ignore _WX_LIST_HELPER_wxPointList;
|
|
||||||
%ignore wxWindowList::Nth;
|
|
||||||
%ignore wxPointList::Nth;
|
|
||||||
%ignore wxPendingDelete;
|
|
||||||
%ignore wxCreateApp;
|
|
||||||
%ignore wxTheAppInitializer;
|
|
||||||
|
|
||||||
%extend wxCharBuffer {
|
|
||||||
wxCharBuffer(const char *str = NULL) {
|
|
||||||
return new wxCharBuffer(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%extend wxWCharBuffer {
|
|
||||||
wxWCharBuffer(const wchar_t *str = NULL) {
|
|
||||||
return new wxWCharBuffer(str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
%ignore wxCharBuffer::wxCharBuffer(const CharType * str);
|
|
||||||
%ignore wxWCharBuffer::wxWCharBuffer(const CharType * str);
|
|
||||||
|
|
||||||
%import "wx/setup.h"
|
%import "wx/setup.h"
|
||||||
#undef HAVE_VISIBILITY
|
#undef HAVE_VISIBILITY
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
%include <common.i>
|
%include <common.i>
|
||||||
|
|
||||||
%import "object.i"
|
%import "object.i"
|
||||||
|
%import "buffer.i"
|
||||||
|
|
||||||
%import "wx/setup.h"
|
%import "wx/setup.h"
|
||||||
#undef HAVE_VISIBILITY
|
#undef HAVE_VISIBILITY
|
||||||
|
|
@ -19,4 +20,3 @@
|
||||||
%import "wx/strconv.h"
|
%import "wx/strconv.h"
|
||||||
%import "wx/strvararg.h"
|
%import "wx/strvararg.h"
|
||||||
%include "wx/string.h"
|
%include "wx/string.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ public:
|
||||||
|
|
||||||
wxCharTypeBuffer& operator=(const wxScopedCharTypeBuffer<T>& src)
|
wxCharTypeBuffer& operator=(const wxScopedCharTypeBuffer<T>& src)
|
||||||
{
|
{
|
||||||
MakeOwnedCopyOf(src);
|
this->MakeOwnedCopyOf(src);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -365,7 +365,7 @@ public:
|
||||||
wxCharBuffer(const wxScopedCharTypeBufferBase& buf)
|
wxCharBuffer(const wxScopedCharTypeBufferBase& buf)
|
||||||
: wxCharTypeBufferBase(buf) {}
|
: wxCharTypeBufferBase(buf) {}
|
||||||
|
|
||||||
wxCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
wxCharBuffer(const wxCharBuffer::CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
||||||
wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
||||||
|
|
||||||
wxCharBuffer(const wxCStrData& cstr);
|
wxCharBuffer(const wxCStrData& cstr);
|
||||||
|
|
@ -382,7 +382,7 @@ public:
|
||||||
wxWCharBuffer(const wxScopedCharTypeBufferBase& buf)
|
wxWCharBuffer(const wxScopedCharTypeBufferBase& buf)
|
||||||
: wxCharTypeBufferBase(buf) {}
|
: wxCharTypeBufferBase(buf) {}
|
||||||
|
|
||||||
wxWCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
wxWCharBuffer(const wxWCharBuffer::CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
||||||
wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
||||||
|
|
||||||
wxWCharBuffer(const wxCStrData& cstr);
|
wxWCharBuffer(const wxCStrData& cstr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue