git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39745
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
46 files changed:
#include "wx/utils.h"
#include "wx/stream.h"
#include "wx/memory.h"
#include "wx/utils.h"
#include "wx/stream.h"
#include "wx/memory.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
+ #include "wx/math.h" //math constants
#endif //WX_PRECOMP
#include "wx/cocoa/autorelease.h"
#endif //WX_PRECOMP
#include "wx/cocoa/autorelease.h"
#import <AppKit/NSTypesetter.h>
#import <AppKit/NSImage.h>
#import <AppKit/NSTypesetter.h>
#import <AppKit/NSImage.h>
-#include "wx/math.h" //math constants
#include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxCocoaDCStack);
#include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxCocoaDCStack);
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/arrstr.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/arrstr.h"
#endif //WX_PRECOMP
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/file.h"
#endif //WX_PRECOMP
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/file.h"
#include <stdlib.h>
#include <ctype.h>
#include <stdlib.h>
#include <ctype.h>
#if wxUSE_STREAMS
#include "wx/datstrm.h"
#if wxUSE_STREAMS
#include "wx/datstrm.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/math.h"
+#endif //WX_PRECOMP
// ---------------------------------------------------------------------------
// wxDataInputStream
// ---------------------------------------------------------------------------
// wxDataInputStream
#endif
#include "wx/dc.h"
#endif
#include "wx/dc.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/math.h"
+#endif
// bool wxDCBase::sm_cacheing = false;
// bool wxDCBase::sm_cacheing = false;
- const size_t len = text.Length();
+ const size_t len = text.length();
widths.Empty();
widths.Add(0, len);
widths.Empty();
widths.Add(0, len);
#include "wx/hash.h"
#include "wx/utils.h"
#include "wx/bitmap.h"
#include "wx/hash.h"
#include "wx/utils.h"
#include "wx/bitmap.h"
#endif
#include "wx/filefn.h"
#include "wx/wfstream.h"
#include "wx/intl.h"
#include "wx/module.h"
#endif
#include "wx/filefn.h"
#include "wx/wfstream.h"
#include "wx/intl.h"
#include "wx/module.h"
#if wxUSE_XPM
#include "wx/xpmdecod.h"
#if wxUSE_XPM
#include "wx/xpmdecod.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/longlong.cpp
+// Name: src/common/longlong.cpp
// Purpose: implementation of wxLongLongNative
// Author: Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin
// Remarks: this class is not public in wxWidgets 2.0! It is intentionally
// Purpose: implementation of wxLongLongNative
// Author: Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin
// Remarks: this class is not public in wxWidgets 2.0! It is intentionally
#endif
#if wxUSE_LONGLONG
#endif
#if wxUSE_LONGLONG
-#include "wx/math.h" // for fabs()
+
+#ifndef WX_PRECOMP
+ #include "wx/math.h" // for fabs()
+#endif
+ #include "wx/txtstrm.h"
#endif
#if defined(__MWERKS__) && defined(__WXMSW__)
#endif
#if defined(__MWERKS__) && defined(__WXMSW__)
-#include <string.h> // for memset()
+ #include <string.h> // for memset()
-#include <memory.h> // for memset()
+ #include <memory.h> // for memset()
#endif
#include "wx/ioswrap.h"
#endif
#include "wx/ioswrap.h"
wxString s = o.ReadWord();
ll = wxULongLong(0l, 0l);
wxString s = o.ReadWord();
ll = wxULongLong(0l, 0l);
- size_t length = s.Length();
+ size_t length = s.length();
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);
wxString s = o.ReadWord();
ll = wxLongLong(0l, 0l);
wxString s = o.ReadWord();
ll = wxLongLong(0l, 0l);
- size_t length = s.Length();
+ size_t length = s.length();
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
+#include "wx/matrix.h"
+
#ifndef WX_PRECOMP
#include "wx/math.h"
#endif
#ifndef WX_PRECOMP
#include "wx/math.h"
#endif
-#include "wx/matrix.h"
-
static const double pi = M_PI;
wxTransformMatrix::wxTransformMatrix(void)
static const double pi = M_PI;
wxTransformMatrix::wxTransformMatrix(void)
#ifndef WX_PRECOMP
#include "wx/string.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#if wxUSE_STREAMS
#include "wx/stream.h"
#endif
#if wxUSE_STREAMS
#include "wx/stream.h"
#endif
#include "wx/string.h"
#include "wx/tokenzr.h"
#include "wx/string.h"
#include "wx/tokenzr.h"
IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject)
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dcmemory.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dcmemory.h"
#endif // WX_PRECOMP
#include "wx/image.h"
#endif // WX_PRECOMP
#include "wx/image.h"
#include "wx/generic/prntdlgg.h"
#include "wx/paper.h"
#include "wx/filefn.h"
#include "wx/generic/prntdlgg.h"
#include "wx/paper.h"
#include "wx/filefn.h"
#include "wx/stdpaths.h"
WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
#include "wx/stdpaths.h"
WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
#include "wx/dcscreen.h"
#include "wx/textctrl.h"
#include "wx/listbox.h"
#include "wx/dcscreen.h"
#include "wx/textctrl.h"
#include "wx/listbox.h"
#endif
#include "wx/selstore.h"
#include "wx/renderer.h"
#endif
#include "wx/selstore.h"
#include "wx/renderer.h"
#ifdef __WXMAC__
#include "wx/mac/private.h"
#ifdef __WXMAC__
#include "wx/mac/private.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/dcscreen.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/dcscreen.h"
#include <stdlib.h>
#include "wx/laywin.h"
#include <stdlib.h>
#include "wx/laywin.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+// Name: src/generic/tabg.cpp
// Purpose: Generic tabbed dialogs
// Author: Julian Smart
// Modified by:
// Purpose: Generic tabbed dialogs
// Author: Julian Smart
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#endif
#if wxUSE_TAB_DIALOG
#endif
#if wxUSE_TAB_DIALOG
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/dcclient.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "wx/tab.h"
#include "wx/listimpl.cpp"
#include "wx/tab.h"
#include "wx/listimpl.cpp"
#include "wx/dcmemory.h"
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/dcmemory.h"
#include "wx/palette.h"
#include "wx/icon.h"
#endif
#include "wx/filefn.h"
#endif
#include "wx/filefn.h"
#include <gdk/gdkimage.h>
#include <gdk/gdkimage.h>
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/dcmemory.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/dcmemory.h"
+ #include "wx/math.h" // for floating-point functions
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
#include "wx/gtk/win_gtk.h"
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
#include "wx/gtk/private.h"
-#include "wx/math.h" // for floating-point functions
-
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include "wx/log.h"
#include "wx/dcmemory.h"
#include "wx/icon.h"
#include "wx/log.h"
#include "wx/dcmemory.h"
#include "wx/icon.h"
#include "wx/fontutil.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/fontutil.h"
#include "wx/gtk/private.h"
#include "wx/module.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/settings.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/settings.h"
#include "wx/strconv.h"
#include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo())
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include "wx/strconv.h"
#include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo())
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include "wx/gtk/private.h"
#include <gdk/gdkkeysyms.h>
#include "wx/gtk/private.h"
#include <gdk/gdkkeysyms.h>
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/statusbr.h"
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/statusbr.h"
#endif
#include "wx/module.h"
#endif
#include "wx/module.h"
#include "wx/thread.h"
#endif
#include "wx/thread.h"
#endif
#include <ctype.h>
// FIXME: Due to a hack we use GtkCombo in here, which is deprecated since gtk2.3.0
#include <ctype.h>
// FIXME: Due to a hack we use GtkCombo in here, which is deprecated since gtk2.3.0
#include "wx/dcmemory.h"
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/dcmemory.h"
#include "wx/palette.h"
#include "wx/icon.h"
#endif // WX_PRECOMP
#include "wx/filefn.h"
#endif // WX_PRECOMP
#include "wx/filefn.h"
extern
void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
extern
void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/dcmemory.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/dcmemory.h"
+ #include "wx/math.h" // for floating-point functions
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
#include "wx/gtk1/win_gtk.h"
#include "wx/gtk1/win_gtk.h"
-#include "wx/math.h" // for floating-point functions
-
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#ifndef WX_PRECOMP
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/gtk1/private.h"
//-----------------------------------------------------------------------------
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/settings.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/settings.h"
#include "wx/strconv.h"
#include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo())
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include "wx/strconv.h"
#include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo())
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include "wx/gtk1/private.h"
#include <gdk/gdkkeysyms.h>
#include "wx/gtk1/private.h"
#include <gdk/gdkkeysyms.h>
// resetting the style and appending some more text wouldn't work: if
// we don't specify the style explicitly, the old style would be used
gtk_editable_delete_selection( GTK_EDITABLE(m_text) );
// resetting the style and appending some more text wouldn't work: if
// we don't specify the style explicitly, the old style would be used
gtk_editable_delete_selection( GTK_EDITABLE(m_text) );
- wxGtkTextInsert(m_text, m_defaultStyle, text.c_str(), text.Len());
+ wxGtkTextInsert(m_text, m_defaultStyle, text.c_str(), text.length());
// we called wxGtkTextInsert with correct font, no need to do anything
// in UpdateFontIfNeeded() any longer
// we called wxGtkTextInsert with correct font, no need to do anything
// in UpdateFontIfNeeded() any longer
// This moves the cursor pos to behind the inserted text.
gint len = GET_EDITABLE_POS(m_text);
// This moves the cursor pos to behind the inserted text.
gint len = GET_EDITABLE_POS(m_text);
- gtk_editable_insert_text( GTK_EDITABLE(m_text), text.c_str(), text.Len(), &len );
+ gtk_editable_insert_text( GTK_EDITABLE(m_text), text.c_str(), text.length(), &len );
// Bring entry's cursor uptodate.
gtk_entry_set_position( GTK_ENTRY(m_text), len );
// Bring entry's cursor uptodate.
gtk_entry_set_position( GTK_ENTRY(m_text), len );
wxString text = GetValue();
// cast to prevent warning. But pos really should've been unsigned.
wxString text = GetValue();
// cast to prevent warning. But pos really should've been unsigned.
- if( (unsigned long)pos > text.Len() )
+ if( (unsigned long)pos > text.length() )
return false;
*x=0; // First Col
return false;
*x=0; // First Col
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/statusbr.h"
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/statusbr.h"
#endif
#include "wx/module.h"
#endif
#include "wx/module.h"
#include "wx/thread.h"
#endif
#include "wx/thread.h"
#endif
#include <ctype.h>
#include "wx/gtk1/private.h"
#include <ctype.h>
#include "wx/gtk1/private.h"
#include "wx/timer.h"
#include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/timer.h"
#include "wx/dcmemory.h"
#include "wx/log.h"
#endif
#include "wx/html/forcelnk.h"
#endif
#include "wx/html/forcelnk.h"
#include "wx/image.h"
#include "wx/gifdecod.h"
#include "wx/artprov.h"
#include "wx/image.h"
#include "wx/gifdecod.h"
#include "wx/artprov.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#include "wx/toplevel.h"
#endif
#include "wx/region.h"
#endif
#include "wx/region.h"
#include "wx/mac/private.h"
//-----------------------------------------------------------------------------
#include "wx/mac/private.h"
//-----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/msgdlg.h"
#ifndef WX_PRECOMP
#include "wx/msgdlg.h"
#include "wx/mac/uma.h"
#include "wx/mac/private/print.h"
#include "wx/mac/uma.h"
#include "wx/mac/private/print.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: thread.cpp
-// Purpose: wxThread Implementation
-// Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
-// Modified by: Aj Lavin, Stefan Csomor
-// Created: 04/22/98
-// RCS-ID: $Id$
-// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
-// Vadim Zeitlin (1999) , Stefan Csomor (2000)
-// Licence: wxWindows licence
+// Name: src/mac/carbon/mpthread.cpp
+// Purpose: wxThread Implementation
+// Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
+// Modified by: Aj Lavin, Stefan Csomor
+// Created: 04/22/98
+// RCS-ID: $Id$
+// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
+// Vadim Zeitlin (1999) , Stefan Csomor (2000)
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#include "wx/module.h"
#include "wx/thread.h"
#include "wx/module.h"
#include "wx/thread.h"
#else
#include <DriverServices.h>
#include <Multiprocessing.h>
#else
#include <DriverServices.h>
#include <Multiprocessing.h>
#endif
#include "wx/mac/uma.h"
#endif
#endif
#include "wx/mac/uma.h"
#endif
// this state)
enum wxThreadState
{
// this state)
enum wxThreadState
{
- STATE_NEW, // didn't start execution yet (=> RUNNING)
- STATE_RUNNING, // thread is running (=> PAUSED, CANCELED)
- STATE_PAUSED, // thread is temporarily suspended (=> RUNNING)
- STATE_CANCELED, // thread should terminate a.s.a.p. (=> EXITED)
- STATE_EXITED // thread is terminating
+ STATE_NEW, // didn't start execution yet (=> RUNNING)
+ STATE_RUNNING, // thread is running (=> PAUSED, CANCELED)
+ STATE_PAUSED, // thread is temporarily suspended (=> RUNNING)
+ STATE_CANCELED, // thread should terminate a.s.a.p. (=> EXITED)
+ STATE_EXITED // thread is terminating
};
// ----------------------------------------------------------------------------
};
// ----------------------------------------------------------------------------
// number of threads waiting for GUI in wxMutexGuiEnter()
static size_t gs_nWaitingForGui = 0;
// number of threads waiting for GUI in wxMutexGuiEnter()
static size_t gs_nWaitingForGui = 0;
-// overall number of threads, needed for determining the sleep value of the main
+// overall number of threads, needed for determining the sleep value of the main
// event loop
size_t g_numberOfThreads = 0;
// event loop
size_t g_numberOfThreads = 0;
The implementation is very close to the phtreads implementation, the reason for
using MPServices is the fact that these are also available under OS 9. Thus allowing
for one common API for all current builds.
The implementation is very close to the phtreads implementation, the reason for
using MPServices is the fact that these are also available under OS 9. Thus allowing
for one common API for all current builds.
As soon as wxThreads are on a 64 bit address space, the TLS must be extended
to use two indices one for each 32 bit part as the MP implementation is limited
to longs.
As soon as wxThreads are on a 64 bit address space, the TLS must be extended
to use two indices one for each 32 bit part as the MP implementation is limited
to longs.
I have two implementations for mutexes :
I have two implementations for mutexes :
- version A based on a binary semaphore, problem - not reentrant, version B based
+ version A based on a binary semaphore, problem - not reentrant, version B based
on a critical region, allows for reentrancy, performance implications not
yet tested
The same for condition internal, one implementation by Aj Lavin and the other one
copied from the thrimpl.cpp which I assume has been more broadly tested, I've just
on a critical region, allows for reentrancy, performance implications not
yet tested
The same for condition internal, one implementation by Aj Lavin and the other one
copied from the thrimpl.cpp which I assume has been more broadly tested, I've just
- replaced the interlock increment with the appropriate PPC calls
+ replaced the interlock increment with the appropriate PPC calls
*/
// ----------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------------
static bool wxMacMPThreadsInitVerify()
{
static bool wxMacMPThreadsInitVerify()
{
- static bool hasThreadManager = false ;
- if ( !hasThreadManager )
- hasThreadManager = MPLibraryIsLoaded();
-
- if ( !hasThreadManager )
+ static bool hasThreadManager = false ;
+ if ( !hasThreadManager )
+ hasThreadManager = MPLibraryIsLoaded();
+
+ if ( !hasThreadManager )
- wxMessageBox( wxT("Error") , wxT("MP Thread Support is not available on this System" ), wxOK ) ;
- return FALSE ;
+ wxMessageBox( wxT("Error") , wxT("MP Thread Support is not available on this System" ), wxOK ) ;
+ return false ;
class wxMutexInternal
{
public:
class wxMutexInternal
{
public:
- wxMutexInternal(wxMutexType mutexType) ;
- ~wxMutexInternal() ;
- bool IsOk() const { return m_isOk; }
-
- wxMutexError Lock() ;
- wxMutexError TryLock() ;
- wxMutexError Unlock();
-private:
+ wxMutexInternal(wxMutexType mutexType) ;
+ ~wxMutexInternal() ;
+ bool IsOk() const { return m_isOk; }
+
+ wxMutexError Lock() ;
+ wxMutexError TryLock() ;
+ wxMutexError Unlock();
+private:
MPSemaphoreID m_semaphore;
bool m_isOk ;
};
MPSemaphoreID m_semaphore;
bool m_isOk ;
};
wxMutexInternal::wxMutexInternal(wxMutexType mutexType )
{
wxMacMPThreadsInitVerify() ;
wxMutexInternal::wxMutexInternal(wxMutexType mutexType )
{
wxMacMPThreadsInitVerify() ;
m_isOk = false ;
m_semaphore = kInvalidID ;
m_isOk = false ;
m_semaphore = kInvalidID ;
OSStatus err = noErr ;
switch( mutexType )
{
case wxMUTEX_DEFAULT :
{
OSStatus err = noErr ;
switch( mutexType )
{
case wxMUTEX_DEFAULT :
{
- verify_noerr( MPCreateBinarySemaphore( & m_semaphore) );
+ verify_noerr( MPCreateBinarySemaphore( & m_semaphore) );
m_isOk = ( m_semaphore != kInvalidID ) ;
}
break ;
m_isOk = ( m_semaphore != kInvalidID ) ;
}
break ;
wxMutexInternal::~wxMutexInternal()
{
if ( m_semaphore != kInvalidID )
wxMutexInternal::~wxMutexInternal()
{
if ( m_semaphore != kInvalidID )
- MPDeleteSemaphore( m_semaphore);
+ MPDeleteSemaphore( m_semaphore);
}
wxMutexError wxMutexInternal::Lock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
}
wxMutexError wxMutexInternal::Lock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
- OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationForever);
- if ( err)
+ OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationForever);
+ if ( err)
- wxLogSysError(wxT("Could not lock mutex"));
- return wxMUTEX_MISC_ERROR;
+ wxLogSysError(wxT("Could not lock mutex"));
+ return wxMUTEX_MISC_ERROR;
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
}
wxMutexError wxMutexInternal::TryLock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
}
wxMutexError wxMutexInternal::TryLock()
{
wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
- OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationImmediate);
- if ( err)
+ OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationImmediate);
+ if ( err)
- if ( err == kMPTimeoutErr)
- {
- return wxMUTEX_BUSY;
- }
- wxLogSysError(wxT("Could not try lock mutex"));
- return wxMUTEX_MISC_ERROR;
+ if ( err == kMPTimeoutErr)
+ {
+ return wxMUTEX_BUSY;
+ }
+ wxLogSysError(wxT("Could not try lock mutex"));
+ return wxMUTEX_MISC_ERROR;
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
}
wxMutexError wxMutexInternal::Unlock()
}
wxMutexError wxMutexInternal::Unlock()
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
- return wxMUTEX_MISC_ERROR;
+ return wxMUTEX_MISC_ERROR;
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
wxMutexInternal(wxMutexType mutexType) ;
~wxMutexInternal() ;
bool IsOk() const { return m_isOk; }
wxMutexInternal(wxMutexType mutexType) ;
~wxMutexInternal() ;
bool IsOk() const { return m_isOk; }
wxMutexError Lock() ;
wxMutexError TryLock() ;
wxMutexError Unlock();
wxMutexError Lock() ;
wxMutexError TryLock() ;
wxMutexError Unlock();
MPCriticalRegionID m_critRegion ;
bool m_isOk ;
};
MPCriticalRegionID m_critRegion ;
bool m_isOk ;
};
wxMacMPThreadsInitVerify() ;
m_isOk = false ;
m_critRegion = kInvalidID ;
wxMacMPThreadsInitVerify() ;
m_isOk = false ;
m_critRegion = kInvalidID ;
verify_noerr( MPCreateCriticalRegion( & m_critRegion) );
m_isOk = ( m_critRegion != kInvalidID ) ;
verify_noerr( MPCreateCriticalRegion( & m_critRegion) );
m_isOk = ( m_critRegion != kInvalidID ) ;
if ( !IsOk() )
wxFAIL_MSG(wxT("Error when creating mutex") ) ;
}
if ( !IsOk() )
wxFAIL_MSG(wxT("Error when creating mutex") ) ;
}
wxLogSysError(wxT("Could not lock mutex"));
return wxMUTEX_MISC_ERROR;
}
wxLogSysError(wxT("Could not lock mutex"));
return wxMUTEX_MISC_ERROR;
}
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
}
wxMutexError wxMutexInternal::TryLock()
}
wxMutexError wxMutexInternal::TryLock()
return wxMUTEX_BUSY;
}
wxLogSysError(wxT("Could not try lock mutex"));
return wxMUTEX_BUSY;
}
wxLogSysError(wxT("Could not try lock mutex"));
- return wxMUTEX_MISC_ERROR;
+ return wxMUTEX_MISC_ERROR;
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
}
wxMutexError wxMutexInternal::Unlock()
}
wxMutexError wxMutexInternal::Unlock()
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
if ( err)
{
wxLogSysError(_("Could not unlock mutex"));
- return wxMUTEX_MISC_ERROR;
+ return wxMUTEX_MISC_ERROR;
-
- return wxMUTEX_NO_ERROR;
+
+ return wxMUTEX_NO_ERROR;
public:
wxSemaphoreInternal(int initialcount, int maxcount);
~wxSemaphoreInternal();
public:
wxSemaphoreInternal(int initialcount, int maxcount);
~wxSemaphoreInternal();
bool IsOk() const { return m_isOk; }
bool IsOk() const { return m_isOk; }
wxSemaError WaitTimeout(unsigned long milliseconds);
wxSemaError WaitTimeout(unsigned long milliseconds);
wxSemaError Wait() { return WaitTimeout( kDurationForever); }
wxSemaError Wait() { return WaitTimeout( kDurationForever); }
-
- wxSemaError TryWait()
- {
- wxSemaError err = WaitTimeout(kDurationImmediate);
+
+ wxSemaError TryWait()
+ {
+ wxSemaError err = WaitTimeout(kDurationImmediate);
if ( err == wxSEMA_TIMEOUT )
err = wxSEMA_BUSY ;
return err ;
}
wxSemaError Post();
if ( err == wxSEMA_TIMEOUT )
err = wxSEMA_BUSY ;
return err ;
}
wxSemaError Post();
private:
MPSemaphoreID m_semaphore;
bool m_isOk ;
private:
MPSemaphoreID m_semaphore;
bool m_isOk ;
}
verify_noerr( MPCreateSemaphore( maxcount, initialcount, & m_semaphore) );
m_isOk = ( m_semaphore != kInvalidID ) ;
}
verify_noerr( MPCreateSemaphore( maxcount, initialcount, & m_semaphore) );
m_isOk = ( m_semaphore != kInvalidID ) ;
if ( !IsOk() )
wxFAIL_MSG(wxT("Error when creating semaphore") ) ;
}
if ( !IsOk() )
wxFAIL_MSG(wxT("Error when creating semaphore") ) ;
}
class wxConditionInternal
{
public:
class wxConditionInternal
{
public:
-
- wxConditionInternal(wxMutex& mutex)
+
+ wxConditionInternal(wxMutex& mutex)
: m_mutex( mutex),
m_semaphore( 0, 1),
m_gate( 1, 1)
: m_mutex( mutex),
m_semaphore( 0, 1),
m_gate( 1, 1)
m_signals = 0;
m_canceled = 0;
}
m_signals = 0;
m_canceled = 0;
}
~wxConditionInternal()
{
}
~wxConditionInternal()
{
}
bool IsOk() const { return m_mutex.IsOk() ; }
bool IsOk() const { return m_mutex.IsOk() ; }
wxCondError Wait()
{
return WaitTimeout( kDurationForever);
}
wxCondError Wait()
{
return WaitTimeout( kDurationForever);
}
wxCondError WaitTimeout(unsigned long msectimeout);
wxCondError WaitTimeout(unsigned long msectimeout);
wxCondError Signal()
{
return DoSignal( false);
}
wxCondError Signal()
{
return DoSignal( false);
}
wxCondError Broadcast()
{
return DoSignal( true);
}
wxCondError Broadcast()
{
return DoSignal( true);
}
wxCondError DoSignal( bool signalAll);
wxCondError DoSignal( bool signalAll);
wxMutex& m_mutex;
wxSemaphoreInternal m_semaphore; // Signals the waiting threads.
wxSemaphoreInternal m_gate;
wxMutex& m_mutex;
wxSemaphoreInternal m_semaphore; // Signals the waiting threads.
wxSemaphoreInternal m_gate;
wxCondError wxConditionInternal::WaitTimeout(unsigned long msectimeout)
wxCondError wxConditionInternal::WaitTimeout(unsigned long msectimeout)
m_gate.Wait();
if ( ++ m_waiters == INT_MAX)
{
m_gate.Wait();
if ( ++ m_waiters == INT_MAX)
{
m_varSection.Leave();
}
m_gate.Post();
m_varSection.Leave();
}
m_gate.Post();
wxSemaError err = m_semaphore.WaitTimeout( msectimeout);
wxASSERT( err == wxSEMA_NO_ERROR || err == wxSEMA_TIMEOUT);
wxSemaError err = m_semaphore.WaitTimeout( msectimeout);
wxASSERT( err == wxSEMA_NO_ERROR || err == wxSEMA_TIMEOUT);
m_varSection.Enter();
if ( err != wxSEMA_NO_ERROR)
{
if ( m_signals > m_canceled)
{
// A signal is being sent after we timed out.
m_varSection.Enter();
if ( err != wxSEMA_NO_ERROR)
{
if ( m_signals > m_canceled)
{
// A signal is being sent after we timed out.
if ( m_waiters == m_signals)
{
// There are no excess waiters to catch the signal, so
// we must throw it away.
if ( m_waiters == m_signals)
{
// There are no excess waiters to catch the signal, so
// we must throw it away.
wxSemaError err2 = m_semaphore.Wait();
if ( err2 != wxSEMA_NO_ERROR)
{
wxSemaError err2 = m_semaphore.Wait();
if ( err2 != wxSEMA_NO_ERROR)
{
}
}
m_varSection.Leave();
}
}
m_varSection.Leave();
{
return err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT : wxCOND_MISC_ERROR;
}
{
return err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT : wxCOND_MISC_ERROR;
}
-
- return wxCOND_NO_ERROR;
+
+ return wxCOND_NO_ERROR;
{
m_gate.Wait();
m_varSection.Enter();
{
m_gate.Wait();
m_varSection.Enter();
wxASSERT( m_signals == m_canceled);
wxASSERT( m_signals == m_canceled);
if ( m_waiters == m_canceled)
{
m_varSection.Leave();
m_gate.Post();
return wxCOND_NO_ERROR;
}
if ( m_waiters == m_canceled)
{
m_varSection.Leave();
m_gate.Post();
return wxCOND_NO_ERROR;
}
if ( m_canceled > 0)
{
m_waiters -= m_canceled;
m_signals = 0;
m_canceled = 0;
}
if ( m_canceled > 0)
{
m_waiters -= m_canceled;
m_signals = 0;
m_canceled = 0;
}
m_signals = signalAll ? m_waiters : 1;
size_t n = m_signals;
m_signals = signalAll ? m_waiters : 1;
size_t n = m_signals;
// Let the waiters inherit the gate lock.
// Let the waiters inherit the gate lock.
do
{
wxSemaError err = m_semaphore.Post();
wxASSERT( err == wxSEMA_NO_ERROR);
} while ( -- n);
do
{
wxSemaError err = m_semaphore.Post();
wxASSERT( err == wxSEMA_NO_ERROR);
} while ( -- n);
return wxCOND_NO_ERROR;
}
return wxCOND_NO_ERROR;
}
m_prio = WXTHREAD_DEFAULT_PRIORITY;
m_notifyQueueId = kInvalidID;
m_exitcode = 0;
m_prio = WXTHREAD_DEFAULT_PRIORITY;
m_notifyQueueId = kInvalidID;
m_exitcode = 0;
- // set to TRUE only when the thread starts waiting on m_semSuspend
- m_isPaused = FALSE;
+ // set to true only when the thread starts waiting on m_semSuspend
+ m_isPaused = false;
// defaults for joinable threads
// defaults for joinable threads
- m_shouldBeJoined = TRUE;
- m_isDetached = FALSE;
+ m_shouldBeJoined = true;
+ m_isDetached = false;
// Get the ID of this thread's underlying MP Services task.
MPTaskID GetId() const { return m_tid; }
// Get the ID of this thread's underlying MP Services task.
MPTaskID GetId() const { return m_tid; }
- void SetCancelFlag() { m_cancelled = TRUE; }
+ void SetCancelFlag() { m_cancelled = true; }
bool WasCancelled() const { return m_cancelled; }
// exit code
void SetExitCode(wxThread::ExitCode exitcode) { m_exitcode = exitcode; }
bool WasCancelled() const { return m_cancelled; }
// exit code
void SetExitCode(wxThread::ExitCode exitcode) { m_exitcode = exitcode; }
{
wxCriticalSectionLocker lock(m_csJoinFlag);
{
wxCriticalSectionLocker lock(m_csJoinFlag);
- m_shouldBeJoined = FALSE;
- m_isDetached = TRUE;
+ m_shouldBeJoined = false;
+ m_isDetached = true;
pthread->SetState(STATE_EXITED);
}
}
pthread->SetState(STATE_EXITED);
}
}
if ( dontRunAtAll )
{
if ( pthread->m_isDetached )
if ( dontRunAtAll )
{
if ( pthread->m_isDetached )
OSStatus err = noErr ;
m_thread = thread;
OSStatus err = noErr ;
m_thread = thread;
if ( m_notifyQueueId == kInvalidID )
{
OSStatus err = MPCreateQueue( & m_notifyQueueId);
if ( m_notifyQueueId == kInvalidID )
{
OSStatus err = MPCreateQueue( & m_notifyQueueId);
err = MPCreateTask( MacThreadStart,
(void*) m_thread,
stackSize,
err = MPCreateTask( MacThreadStart,
(void*) m_thread,
stackSize,
- wxLogSysError(_("Can't create thread"));
+ wxLogSysError(_("Can't create thread"));
if ( m_prio != WXTHREAD_DEFAULT_PRIORITY )
{
SetPriority(m_prio);
}
if ( m_prio != WXTHREAD_DEFAULT_PRIORITY )
{
SetPriority(m_prio);
}
return true;
}
void wxThreadInternal::SetPriority( int priority)
{
m_prio = priority;
return true;
}
void wxThreadInternal::SetPriority( int priority)
{
m_prio = priority;
if ( m_tid)
{
// Mac priorities range from 1 to 10,000, with a default of 100.
if ( m_tid)
{
// Mac priorities range from 1 to 10,000, with a default of 100.
// We can map wxWidgets to Mac priorities easily by assuming
// the former uses a logarithmic scale.
const unsigned int macPriority = ( int)( exp( priority / 25.0 * log( 10.0)) + 0.5);
// We can map wxWidgets to Mac priorities easily by assuming
// the former uses a logarithmic scale.
const unsigned int macPriority = ( int)( exp( priority / 25.0 * log( 10.0)) + 0.5);
MPSetTaskWeight( m_tid, macPriority);
}
}
MPSetTaskWeight( m_tid, macPriority);
}
}
void * param2;
void * rc;
void * param2;
void * rc;
- OSStatus err = MPWaitOnQueue ( m_notifyQueueId,
- & param1,
- & param2,
- & rc,
+ OSStatus err = MPWaitOnQueue ( m_notifyQueueId,
+ & param1,
+ & param2,
+ & rc,
kDurationForever);
if ( err)
{
kDurationForever);
if ( err)
{
// but we don't need this here
m_exitcode = rc;
// but we don't need this here
m_exitcode = rc;
- m_shouldBeJoined = FALSE;
+ m_shouldBeJoined = false;
{
g_numberOfThreads++;
m_internal = new wxThreadInternal();
{
g_numberOfThreads++;
m_internal = new wxThreadInternal();
m_isDetached = (kind == wxTHREAD_DETACHED);
}
m_isDetached = (kind == wxTHREAD_DETACHED);
}
wxThreadError wxThread::Create(unsigned int stackSize)
{
wxCriticalSectionLocker lock(m_critsect);
wxThreadError wxThread::Create(unsigned int stackSize)
{
wxCriticalSectionLocker lock(m_critsect);
if ( m_isDetached )
{
m_internal->Detach() ;
if ( m_isDetached )
{
m_internal->Detach() ;
m_internal->SetState(STATE_EXITED);
return wxTHREAD_NO_RESOURCE;
}
m_internal->SetState(STATE_EXITED);
return wxTHREAD_NO_RESOURCE;
}
return wxTHREAD_NO_ERROR;
}
return wxTHREAD_NO_ERROR;
}
OnExit();
MPTerminateTask( m_internal->GetId() , (long) status) ;
OnExit();
MPTerminateTask( m_internal->GetId() , (long) status) ;
if ( IsDetached() )
{
delete this;
if ( IsDetached() )
{
delete this;
{
case STATE_RUNNING:
case STATE_PAUSED:
{
case STATE_RUNNING:
case STATE_PAUSED:
public:
virtual bool OnInit();
virtual void OnExit();
public:
virtual bool OnInit();
virtual void OnExit();
private:
DECLARE_DYNAMIC_CLASS(wxThreadModule)
};
private:
DECLARE_DYNAMIC_CLASS(wxThreadModule)
};
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
bool wxThreadModule::OnInit()
IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
bool wxThreadModule::OnInit()
if ( !wxMacMPThreadsInitVerify() )
{
if ( !wxMacMPThreadsInitVerify() )
{
verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ;
// main thread's This() is NULL
verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , NULL ) ) ;
gs_idMainThread = wxThread::GetCurrentId() ;
verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ;
// main thread's This() is NULL
verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , NULL ) ) ;
gs_idMainThread = wxThread::GetCurrentId() ;
gs_critsectWaitingForGui = new wxCriticalSection();
gs_critsectGui = new wxCriticalSection();
gs_critsectGui->Enter();
gs_critsectWaitingForGui = new wxCriticalSection();
gs_critsectGui = new wxCriticalSection();
gs_critsectGui->Enter();
}
void wxThreadModule::OnExit()
}
void wxThreadModule::OnExit()
#include "wx/app.h"
#include "wx/msgdlg.h"
#include "wx/dcprint.h"
#include "wx/app.h"
#include "wx/msgdlg.h"
#include "wx/dcprint.h"
#include "wx/mac/uma.h"
#include "wx/mac/printmac.h"
#include "wx/mac/uma.h"
#include "wx/mac/printmac.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/thread.cpp
-// Purpose: wxThread Implementation
-// Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
+// Name: src/mac/carbon/thread.cpp
+// Purpose: wxThread Implementation
+// Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
// Modified by: Aj Lavin, Stefan Csomor
// Modified by: Aj Lavin, Stefan Csomor
-// Created: 04/22/98
-// RCS-ID: $Id$
-// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
-// Vadim Zeitlin (1999), Stefan Csomor (2000)
-// Licence: wxWindows licence
+// Created: 04/22/98
+// RCS-ID: $Id$
+// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
+// Vadim Zeitlin (1999), Stefan Csomor (2000)
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#endif
#ifndef WX_PRECOMP
#endif
#ifndef WX_PRECOMP
#else
#include <DriverServices.h>
#include <Multiprocessing.h>
#else
#include <DriverServices.h>
#include <Multiprocessing.h>
#endif
#include "wx/mac/uma.h"
#endif
#include "wx/mac/uma.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#include "wx/toplevel.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#include "wx/toplevel.h"
#endif
#include "wx/region.h"
#endif
#include "wx/region.h"
#include "wx/mac/private.h"
//-----------------------------------------------------------------------------
#include "wx/mac/private.h"
//-----------------------------------------------------------------------------
#ifndef WX_PRECOMP
#include "wx/msgdlg.h"
#ifndef WX_PRECOMP
#include "wx/msgdlg.h"
#include "wx/mac/uma.h"
#include "wx/mac/private/print.h"
#include "wx/mac/uma.h"
#include "wx/mac/private/print.h"
#include "wx/motif/bmpmotif.h"
#include "wx/motif/bmpmotif.h"
+#ifndef WX_PRECOMP
+ #include "wx/math.h"
+#endif
+
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include <X11/xpm.h>
#endif
#include <X11/xpm.h>
#endif
Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap );
static inline wxCharBuffer GetCacheImageName(WXImage image)
Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap );
static inline wxCharBuffer GetCacheImageName(WXImage image)
#include "wx/app.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#include "wx/app.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
#ifdef __VMS__
#pragma message disable nosimpint
#ifdef __VMS__
#pragma message disable nosimpint
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/cmndata.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/cmndata.h"
#endif
#include "wx/msw/private.h"
#endif
#include "wx/msw/private.h"
#include "wx/msw/wrapcdlg.h"
#include <stdlib.h>
#include "wx/msw/wrapcdlg.h"
#include <stdlib.h>
#include "wx/log.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#include "wx/log.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#endif
#include "wx/msw/private.h"
#endif
#include "wx/msw/private.h"
#include "wx/printdlg.h"
#include "wx/msw/printdlg.h"
#include "wx/printdlg.h"
#include "wx/msw/printdlg.h"
#include "wx/msw/wrapcdlg.h"
#ifndef __WIN32__
#include "wx/msw/wrapcdlg.h"
#ifndef __WIN32__
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/app.h"
#endif
#include "wx/msw/wrapcdlg.h"
#endif
#include "wx/msw/wrapcdlg.h"
#include "wx/filename.h"
#include "wx/tokenzr.h"
#include "wx/filename.h"
#include "wx/tokenzr.h"
#include "wx/msw/missing.h"
#include "wx/msw/missing.h"
#include "wx/dialog.h"
#include "wx/log.h"
#include "wx/cmndata.h"
#include "wx/dialog.h"
#include "wx/log.h"
#include "wx/cmndata.h"
#endif
#include "wx/msw/wrapcdlg.h"
#endif
#include "wx/msw/wrapcdlg.h"
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include "wx/log.h"
#include "wx/dcclient.h"
#include "wx/timer.h"
#include "wx/log.h"
#include "wx/dcclient.h"
#include "wx/timer.h"
+ #include "wx/math.h" // log10 & pow
-#include "wx/math.h" // log10 & pow
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dynlib.h"
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dynlib.h"
#include "wx/log.h"
#include "wx/dcclient.h"
#include "wx/timer.h"
#include "wx/log.h"
#include "wx/dcclient.h"
#include "wx/timer.h"
+ #include "wx/math.h" // log10 & pow
-#include "wx/math.h" // log10 & pow
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dynlib.h"
#include "wx/stopwatch.h"
#include "wx/msw/private.h" // user info and wndproc setting/getting
#include "wx/dynlib.h"
#include "wx/stopwatch.h"
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
#ifndef WX_PRECOMP
#include "wx/dcclient.h"
// I don't know why members of tagVARIANT aren't found when compiling
// with Wine
#ifndef __WINE__
// I don't know why members of tagVARIANT aren't found when compiling
// with Wine
#ifndef __WINE__
#ifndef WX_PRECOMP
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif
#define _FORCENAMELESSUNION
#include "wx/msw/private.h"
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/ole/automtn.h"
#endif
#define _FORCENAMELESSUNION
#include "wx/msw/private.h"
#include "wx/msw/ole/oleutils.h"
#include "wx/msw/ole/automtn.h"
#ifdef __WXWINCE__
#include "wx/msw/wince/time.h"
#ifdef __WXWINCE__
#include "wx/msw/wince/time.h"
#include "wx/app.h"
#include "wx/dcmemory.h"
#include "wx/icon.h"
#include "wx/app.h"
#include "wx/dcmemory.h"
#include "wx/icon.h"
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
#include "wx/wfstream.h"
#endif
#endif
#include "wx/wfstream.h"
#endif
#endif
//-----------------------------------------------------------------------------
// wxMask
//-----------------------------------------------------------------------------
// wxMask
#include "wx/app.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#include "wx/app.h"
#include "wx/window.h"
#include "wx/dcmemory.h"
#endif
#include "wx/image.h"
#endif
#include "wx/image.h"
#include "wx/x11/private.h"
#include "wx/x11/private.h"
#if wxUSE_UNICODE
#include "glib.h"
#include "pango/pangox.h"
#if wxUSE_UNICODE
#include "glib.h"
#include "pango/pangox.h"
#endif
{
XDrawString( (Display*) m_display, (Window) m_window,
#endif
{
XDrawString( (Display*) m_display, (Window) m_window,
- (GC) m_textGC, x, y + XFontStructGetAscent(xfont), text.c_str(), text.Len() );
+ (GC) m_textGC, x, y + XFontStructGetAscent(xfont), text.c_str(), text.length() );
int direction, ascent, descent2;
XCharStruct overall;
int direction, ascent, descent2;
XCharStruct overall;
- XTextExtents( xfont, (char*) string.c_str(), string.Len(), &direction,
+ XTextExtents( xfont, (char*) string.c_str(), string.length(), &direction,
&ascent, &descent2, &overall);
if (width)
&ascent, &descent2, &overall);
if (width)