wxInt32 m_y;
};
-wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
-wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
-wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
-wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
-wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
-wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
-wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
-wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
-wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
-wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator+(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator-(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
+inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
+inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n);
inline wxPoint2DInt::wxPoint2DInt()
{
/* Expand ~ and ~user */
nm = lnm;
- s = wxT("");
if (nm[0] == wxT('~') && !q)
{
/* prefix ~ */
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
if (was_sep) /* replace only if it was there: */
*s = SEP;
- s = wxT("");
+ s = NULL;
} else {
nm = nnm;
s = home;
bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
{
- wxChar *tmp_buf;
+ const wxChar *request;
switch (req) {
case wxHTTP_GET:
- tmp_buf = wxT("GET");
+ request = wxT("GET");
break;
default:
return FALSE;
Notify(FALSE);
wxString buf;
- buf.Printf(wxT("%s %s HTTP/1.0\r\n"), tmp_buf, path.c_str());
+ buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
const wxWX2MBbuf pathbuf = wxConvLibc.cWX2MB(buf);
Write(pathbuf, strlen(wxMBSTRINGCAST pathbuf));
SendHeaders();
# include <time.h>
#include <unistd.h>
+// XPM hack: make the arrays const
+#define static static const
+
#ifndef __DOS__
#include "wx/generic/home.xpm"
#endif
#include "wx/generic/deffile.xpm"
#include "wx/generic/exefile.xpm"
+#undef static
+
//-----------------------------------------------------------------------------
// wxFileData
//-----------------------------------------------------------------------------
// XPMs
// ----------------------------------------------------------------------------
+// XPM hack: make the arrays const
+#define static static const
+
#ifndef __WXMSW__
#include "wx/generic/cross.xpm"
#include "wx/generic/tick.xpm"
#endif
+#undef static
+
// ----------------------------------------------------------------------------
// accessor functions for the bitmaps (may return NULL, check for it!)
// ----------------------------------------------------------------------------
#if defined(__WXMSW__) || defined(__WXPM__)
wxIcon icon("wxICON_TIP");
#else
+ // XPM hack: make the arrays const
+ #define static static const
+
#include "wx/generic/tip.xpm"
+
+ #undef static
+
wxIcon icon(tipIcon);
#endif
wxStaticBitmap *bmp = new wxStaticBitmap(this, -1, icon);
#ifndef __WXUNIVERSAL__
+// XPM hack: make the arrays const
+#define static static const
+
#include "wx/gtk/info.xpm"
#include "wx/gtk/error.xpm"
#include "wx/gtk/question.xpm"
#include "wx/gtk/warning.xpm"
+#undef static
+
wxIcon wxApp::GetStdIcon(int which) const
{
switch(which)
gint m_tag;
};
-static gint wxlistbox_idle_callback( gpointer gdata )
+extern "C" gint wxlistbox_idle_callback( gpointer gdata )
{
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
gdk_threads_enter();
static gint gs_pop_x = 0;
static gint gs_pop_y = 0;
-static void wxPopupMenuPositionCallback( GtkMenu *menu,
- gint *x, gint *y,
- gpointer WXUNUSED(user_data) )
+extern "C" void wxPopupMenuPositionCallback( GtkMenu *menu,
+ gint *x, gint *y,
+ gpointer WXUNUSED(user_data) )
{
// ensure that the menu appears entirely on screen
GtkRequisition req;
#ifndef __WXUNIVERSAL__
+// XPM hack: make the arrays const
+#define static static const
+
#include "wx/gtk/info.xpm"
#include "wx/gtk/error.xpm"
#include "wx/gtk/question.xpm"
#include "wx/gtk/warning.xpm"
+#undef static
+
wxIcon wxApp::GetStdIcon(int which) const
{
switch(which)
gint m_tag;
};
-static gint wxlistbox_idle_callback( gpointer gdata )
+extern "C" gint wxlistbox_idle_callback( gpointer gdata )
{
wxlistbox_idle_struct* data = (wxlistbox_idle_struct*) gdata;
gdk_threads_enter();
static gint gs_pop_x = 0;
static gint gs_pop_y = 0;
-static void wxPopupMenuPositionCallback( GtkMenu *menu,
- gint *x, gint *y,
- gpointer WXUNUSED(user_data) )
+extern "C" void wxPopupMenuPositionCallback( GtkMenu *menu,
+ gint *x, gint *y,
+ gpointer WXUNUSED(user_data) )
{
// ensure that the menu appears entirely on screen
GtkRequisition req;
// Bitmaps:
#ifndef __WXMSW__
-#include "bitmaps/wpanel.xpm"
-#include "bitmaps/wback.xpm"
-#include "bitmaps/wforward.xpm"
-#include "bitmaps/wbook.xpm"
-#include "bitmaps/woptions.xpm"
-#include "bitmaps/wfolder.xpm"
-#include "bitmaps/wpage.xpm"
-#include "bitmaps/whelp.xpm"
-#include "bitmaps/whlproot.xpm"
-#include "bitmaps/wbkadd.xpm"
-#include "bitmaps/wbkdel.xpm"
-#include "bitmaps/wup.xpm"
-#include "bitmaps/wupnode.xpm"
-#include "bitmaps/wdown.xpm"
-#include "bitmaps/wopen.xpm"
-#include "bitmaps/wprint.xpm"
-#endif
-
+ // XPM hack: make the arrays const
+ #define static static const
+
+ #include "bitmaps/wpanel.xpm"
+ #include "bitmaps/wback.xpm"
+ #include "bitmaps/wforward.xpm"
+ #include "bitmaps/wbook.xpm"
+ #include "bitmaps/woptions.xpm"
+ #include "bitmaps/wfolder.xpm"
+ #include "bitmaps/wpage.xpm"
+ #include "bitmaps/whelp.xpm"
+ #include "bitmaps/whlproot.xpm"
+ #include "bitmaps/wbkadd.xpm"
+ #include "bitmaps/wbkdel.xpm"
+ #include "bitmaps/wup.xpm"
+ #include "bitmaps/wupnode.xpm"
+ #include "bitmaps/wdown.xpm"
+ #include "bitmaps/wopen.xpm"
+ #include "bitmaps/wprint.xpm"
+
+ #undef static
+#endif // __WXMSW__
// what is considered "small index"?
#define INDEX_IS_SMALL 100
// Bitmaps:
#ifndef __WXMSW__
-#include "bitmaps/panel.xpm"
-#include "bitmaps/back.xpm"
-#include "bitmaps/forward.xpm"
-#include "bitmaps/book.xpm"
-#include "bitmaps/folder.xpm"
-#include "bitmaps/page.xpm"
+ // XPM hack: make the arrays const
+ #define static static const
+
+ #include "bitmaps/panel.xpm"
+ #include "bitmaps/back.xpm"
+ #include "bitmaps/forward.xpm"
+ #include "bitmaps/book.xpm"
+ #include "bitmaps/folder.xpm"
+ #include "bitmaps/page.xpm"
+
+ #undef static
#endif
#include "search.h"
int sz;
char *buff, *lineptr;
char linebuf[300];
-
+
wxString title = _("noname"),
safetitle,
start = wxEmptyString,
contents = wxEmptyString, index = wxEmptyString;
-
+
if (wxIsAbsolutePath(book)) bookFull = book;
else bookFull = wxGetCwd() + "/" + book;
m_BookRecords.Add(bookr);
if (m_IndexCnt > 0)
qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc);
-
+
return TRUE;
}
public:
bool m_Canceled;
- MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1,
- _("Searching..."),
- wxPoint(0, 0),
+ MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1,
+ _("Searching..."),
+ wxPoint(0, 0),
#ifdef __WXGTK__
- wxSize(300, 110))
+ wxSize(300, 110)
#else
- wxSize(300, 130))
+ wxSize(300, 130)
#endif
+ )
{m_Canceled = FALSE;}
void OnCancel(wxCommandEvent& event) {m_Canceled = TRUE;}
DECLARE_EVENT_TABLE()
#endif
-
+
bool wxHtmlHelpController::KeywordSearch(const wxString& keyword)
{
int foundcnt = 0;
// TODO use XmGetPixmap (?) to get the really standard icons!
+// XPM hack: make the arrays const
+#define static static const
+
#include "wx/generic/info.xpm"
#include "wx/generic/error.xpm"
#include "wx/generic/question.xpm"
#include "wx/generic/warning.xpm"
+#undef static
+
wxIcon
wxApp::GetStdIcon(int which) const
{
return GetXFontName();
}
-bool wxNativeFontInfo::FromXFontName(const wxString& xFontName)
+bool wxNativeFontInfo::FromXFontName(const wxString& fontname)
{
// TODO: we should be able to handle the font aliases here, but how?
- wxStringTokenizer tokenizer(xFontName, _T("-"), wxTOKEN_STRTOK);
+ wxStringTokenizer tokenizer(fontname, _T("-"), wxTOKEN_STRTOK);
for ( size_t n = 0; n < WXSIZEOF(fontElements); n++ )
{
// wxThread (Posix implementation)
//--------------------------------------------------------------------
+// the thread callback functions must have the C linkage
+extern "C"
+{
+
#if HAVE_THREAD_CLEANUP_FUNCTIONS
+ // thread exit function
+ void wxPthreadCleanup(void *ptr);
+#endif // HAVE_THREAD_CLEANUP_FUNCTIONS
-// thread exit function
-extern "C" void wxPthreadCleanup(void *ptr);
+void *wxPthreadStart(void *ptr);
-#endif // HAVE_THREAD_CLEANUP_FUNCTIONS
+} // extern "C"
class wxThreadInternal
{
~wxThreadInternal();
// thread entry function
- static void *PthreadStart(void *ptr);
+ static void *PthreadStart(wxThread *thread);
// thread actions
// start the thread
// thread startup and exit functions
// ----------------------------------------------------------------------------
-void *wxThreadInternal::PthreadStart(void *ptr)
+void *wxPthreadStart(void *ptr)
+{
+ return wxThreadInternal::PthreadStart((wxThread *)ptr);
+}
+
+void *wxThreadInternal::PthreadStart(wxThread *thread)
{
- wxThread *thread = (wxThread *)ptr;
wxThreadInternal *pthread = thread->m_internal;
// associate the thread pointer with the newly created thread so that
#if HAVE_THREAD_CLEANUP_FUNCTIONS
// install the cleanup handler which will be called if the thread is
// cancelled
- pthread_cleanup_push(wxPthreadCleanup, ptr);
+ pthread_cleanup_push(wxPthreadCleanup, thread);
#endif // HAVE_THREAD_CLEANUP_FUNCTIONS
// wait for the condition to be signaled from Run()
(
m_internal->GetIdPtr(),
&attr,
- wxThreadInternal::PthreadStart,
+ wxPthreadStart,
(void *)this
);