modified configure to allow configuration of wxMotif under Darwin/Mac OS X
wxWindows can be configured as wxMac or wxMotif under Mac OS X replaced __WXMAC_X__ define by __DARWIN__ (general Darwin related issues) moved dlopen/dlerror code to dynlib.cpp to make it available for wxMotif git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// mac
|
// mac
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#include <profiler.h>
|
#include <profiler.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
#include "wx/mac/macnotfy.h"
|
#include "wx/mac/macnotfy.h"
|
||||||
|
|
||||||
#if wxUSE_SOCKETS
|
#if wxUSE_SOCKETS
|
||||||
#ifdef __APPLE__
|
#ifdef __DARWIN__
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#else
|
#else
|
||||||
#include <OpenTransport.h>
|
#include <OpenTransport.h>
|
||||||
@@ -374,7 +374,7 @@ bool wxApp::Initialize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
// test the minimal configuration necessary
|
// test the minimal configuration necessary
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
@@ -427,7 +427,7 @@ bool wxApp::Initialize()
|
|||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
|
ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
|
||||||
#endif
|
#endif
|
||||||
@@ -435,7 +435,7 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
// now avoid exceptions thrown for new (bad_alloc)
|
// now avoid exceptions thrown for new (bad_alloc)
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
std::__throws_bad_alloc = FALSE ;
|
std::__throws_bad_alloc = FALSE ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
wxClassInfo::CleanUpClasses();
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
ProfilerDump( "\papp.prof" ) ;
|
ProfilerDump( "\papp.prof" ) ;
|
||||||
ProfilerTerm() ;
|
ProfilerTerm() ;
|
||||||
|
@@ -29,7 +29,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject )
|
|||||||
IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject )
|
IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#else
|
#else
|
||||||
#include <PictUtils.h>
|
#include <PictUtils.h>
|
||||||
@@ -841,7 +841,7 @@ PicHandle wxBitmap::GetPict() const
|
|||||||
|
|
||||||
if( mask )
|
if( mask )
|
||||||
{
|
{
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
RGBColor trans = white;
|
RGBColor trans = white;
|
||||||
#else
|
#else
|
||||||
RGBBackColor( &gray );
|
RGBBackColor( &gray );
|
||||||
|
@@ -57,7 +57,7 @@ void wxButton::SetDefault()
|
|||||||
panel->SetDefaultItem(this);
|
panel->SetDefaultItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
Boolean inData;
|
Boolean inData;
|
||||||
if ( btnOldDefault && btnOldDefault->m_macControl )
|
if ( btnOldDefault && btnOldDefault->m_macControl )
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// mac
|
// mac
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
#include <profiler.h>
|
#include <profiler.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
#include "wx/mac/macnotfy.h"
|
#include "wx/mac/macnotfy.h"
|
||||||
|
|
||||||
#if wxUSE_SOCKETS
|
#if wxUSE_SOCKETS
|
||||||
#ifdef __APPLE__
|
#ifdef __DARWIN__
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#else
|
#else
|
||||||
#include <OpenTransport.h>
|
#include <OpenTransport.h>
|
||||||
@@ -374,7 +374,7 @@ bool wxApp::Initialize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
// test the minimal configuration necessary
|
// test the minimal configuration necessary
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
@@ -427,7 +427,7 @@ bool wxApp::Initialize()
|
|||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
|
ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
|
||||||
#endif
|
#endif
|
||||||
@@ -435,7 +435,7 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
// now avoid exceptions thrown for new (bad_alloc)
|
// now avoid exceptions thrown for new (bad_alloc)
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
std::__throws_bad_alloc = FALSE ;
|
std::__throws_bad_alloc = FALSE ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
wxClassInfo::CleanUpClasses();
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if __option(profile)
|
#if __option(profile)
|
||||||
ProfilerDump( "\papp.prof" ) ;
|
ProfilerDump( "\papp.prof" ) ;
|
||||||
ProfilerTerm() ;
|
ProfilerTerm() ;
|
||||||
|
@@ -29,7 +29,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxBitmapBase , wxGDIObject )
|
|||||||
IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject )
|
IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandlerBase, wxObject )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#else
|
#else
|
||||||
#include <PictUtils.h>
|
#include <PictUtils.h>
|
||||||
@@ -841,7 +841,7 @@ PicHandle wxBitmap::GetPict() const
|
|||||||
|
|
||||||
if( mask )
|
if( mask )
|
||||||
{
|
{
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
RGBColor trans = white;
|
RGBColor trans = white;
|
||||||
#else
|
#else
|
||||||
RGBBackColor( &gray );
|
RGBBackColor( &gray );
|
||||||
|
@@ -57,7 +57,7 @@ void wxButton::SetDefault()
|
|||||||
panel->SetDefaultItem(this);
|
panel->SetDefaultItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
Boolean inData;
|
Boolean inData;
|
||||||
if ( btnOldDefault && btnOldDefault->m_macControl )
|
if ( btnOldDefault && btnOldDefault->m_macControl )
|
||||||
{
|
{
|
||||||
|
@@ -38,7 +38,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
|
|||||||
#define twips2mm 0.0176388888889
|
#define twips2mm 0.0176388888889
|
||||||
#define mm2pt 2.83464566929
|
#define mm2pt 2.83464566929
|
||||||
#define pt2mm 0.352777777778
|
#define pt2mm 0.352777777778
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
const double M_PI = 3.14159265358979 ;
|
const double M_PI = 3.14159265358979 ;
|
||||||
#endif
|
#endif
|
||||||
const double RAD2DEG = 180.0 / M_PI;
|
const double RAD2DEG = 180.0 / M_PI;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "wx/cmndata.h"
|
#include "wx/cmndata.h"
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
#ifdef __DARWIN__
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#else
|
#else
|
||||||
#include <Navigation.h>
|
#include <Navigation.h>
|
||||||
|
@@ -36,11 +36,11 @@
|
|||||||
#include "wx/dir.h"
|
#include "wx/dir.h"
|
||||||
#include "wx/filefn.h" // for wxPathExists()
|
#include "wx/filefn.h" // for wxPathExists()
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WXMAC__) && !defined(__UNIX__)
|
#ifndef __DARWIN__
|
||||||
#include "morefile.h"
|
#include "morefile.h"
|
||||||
#include "moreextr.h"
|
#include "moreextr.h"
|
||||||
#include "fullpath.h"
|
#include "fullpath.h"
|
||||||
@@ -118,7 +118,7 @@ wxDirData::wxDirData(const wxString& dirname)
|
|||||||
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
||||||
m_index = 0 ;
|
m_index = 0 ;
|
||||||
|
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
// TODO: what are we supposed to do for Mac OS X
|
// TODO: what are we supposed to do for Mac OS X
|
||||||
#else
|
#else
|
||||||
FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
||||||
|
@@ -39,7 +39,7 @@ wxDropTarget::~wxDropTarget()
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTextDropTarget
|
// wxTextDropTarget
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData )
|
bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData )
|
||||||
{
|
{
|
||||||
OnDropText( x, y, (const char*)pData );
|
OnDropText( x, y, (const char*)pData );
|
||||||
@@ -54,7 +54,7 @@ bool wxTextDropTarget::OnDropText( wxCoord x, wxCoord y, const wxString &psz )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
size_t wxTextDropTarget::GetFormatCount() const
|
size_t wxTextDropTarget::GetFormatCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -70,7 +70,7 @@ wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const
|
|||||||
// wxFileDropTarget
|
// wxFileDropTarget
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] )
|
bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] )
|
||||||
{
|
{
|
||||||
printf( "Got %d dropped files.\n", (int)nFiles );
|
printf( "Got %d dropped files.\n", (int)nFiles );
|
||||||
@@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDrop(wxCoord x, wxCoord y, const wxArrayString& filenam
|
|||||||
return OnDropFiles(x, y, 1, &filenames);
|
return OnDropFiles(x, y, 1, &filenames);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
size_t wxFileDropTarget::GetFormatCount() const
|
size_t wxFileDropTarget::GetFormatCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
@@ -80,7 +80,7 @@ void wxCYield() ;
|
|||||||
#define qDebug2 1
|
#define qDebug2 1
|
||||||
extern pascal void OTDebugStr(const char* str);
|
extern pascal void OTDebugStr(const char* str);
|
||||||
#endif
|
#endif
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#include <OTDebug.h>
|
#include <OTDebug.h>
|
||||||
#endif
|
#endif
|
||||||
InetSvcRef gInetSvcRef = 0 ;
|
InetSvcRef gInetSvcRef = 0 ;
|
||||||
@@ -121,7 +121,7 @@ OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode)
|
|||||||
ret.opt.maxlen = kOTFourByteOptionSize;
|
ret.opt.maxlen = kOTFourByteOptionSize;
|
||||||
|
|
||||||
opt->level = INET_IP; // dealing with an IP Level function
|
opt->level = INET_IP; // dealing with an IP Level function
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
opt->name = kIP_REUSEADDR;
|
opt->name = kIP_REUSEADDR;
|
||||||
#else
|
#else
|
||||||
opt->name = IP_REUSEADDR;
|
opt->name = IP_REUSEADDR;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include "ldef/extldef.h"
|
#include "ldef/extldef.h"
|
||||||
#else
|
#else
|
||||||
#include "extldef.h"
|
#include "extldef.h"
|
||||||
|
@@ -56,7 +56,7 @@ const short kwxMacAppleMenuId = 1 ;
|
|||||||
|
|
||||||
// Construct a menu with optional title (then use append)
|
// Construct a menu with optional title (then use append)
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
short wxMenu::s_macNextMenuId = 3 ;
|
short wxMenu::s_macNextMenuId = 3 ;
|
||||||
#else
|
#else
|
||||||
short wxMenu::s_macNextMenuId = 2 ;
|
short wxMenu::s_macNextMenuId = 2 ;
|
||||||
@@ -450,7 +450,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
else if ( macMenuId == kHMHelpMenuID )
|
else if ( macMenuId == kHMHelpMenuID )
|
||||||
{
|
{
|
||||||
int menuItem = formerHelpMenuItems ;
|
int menuItem = formerHelpMenuItems ;
|
||||||
@@ -499,7 +499,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // __WXMAC_X__
|
#endif // __DARWIN__
|
||||||
|
|
||||||
for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++)
|
for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++)
|
||||||
{
|
{
|
||||||
@@ -898,7 +898,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
for (int i = 0; i < m_menus.GetCount() ; i++)
|
for (int i = 0; i < m_menus.GetCount() ; i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacGetMenuId() == macMenuId
|
if ( m_menus[i]->MacGetMenuId() == macMenuId
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
||
|
||
|
||||||
( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) )
|
( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) )
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
// check that the page index is valid
|
// check that the page index is valid
|
||||||
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
||||||
|
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
|
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
|
||||||
const short kwxMacTabLeftMargin = 20 ;
|
const short kwxMacTabLeftMargin = 20 ;
|
||||||
const short kwxMacTabTopMargin = 38 ;
|
const short kwxMacTabTopMargin = 38 ;
|
||||||
@@ -76,7 +76,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
|
|||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void wxNotebook::Init()
|
void wxNotebook::Init()
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
m_macHorizontalBorder = 7;
|
m_macHorizontalBorder = 7;
|
||||||
m_macVerticalBorder = 8;
|
m_macVerticalBorder = 8;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
# include <fstream>
|
# include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#pragma implementation "textctrl.h"
|
#pragma implementation "textctrl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#else
|
#else
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__WXMAC_X__)
|
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__)
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
#include "wx/mac/aga.h"
|
#include "wx/mac/aga.h"
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#include <Navigation.h>
|
#include <Navigation.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
#endif // UMA_USE_WINDOWMGR
|
#endif // UMA_USE_WINDOWMGR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
// Call currently implicitely done : InitFloatingWindows() ;
|
// Call currently implicitely done : InitFloatingWindows() ;
|
||||||
#else
|
#else
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
// defined in unix/utilsunx.cpp for Mac OS X
|
// defined in unix/utilsunx.cpp for Mac OS X
|
||||||
|
|
||||||
// get full hostname (with domain name if possible)
|
// get full hostname (with domain name if possible)
|
||||||
@@ -178,7 +178,7 @@ void wxFatalError(const wxString& msg, const wxString& title)
|
|||||||
wxMessageBox(wxBuffer);
|
wxMessageBox(wxBuffer);
|
||||||
wxExit();
|
wxExit();
|
||||||
}
|
}
|
||||||
#endif // !__UNIX__
|
#endif // !__DARWIN__
|
||||||
|
|
||||||
// Emit a beeeeeep
|
// Emit a beeeeeep
|
||||||
void wxBell()
|
void wxBell()
|
||||||
@@ -315,7 +315,7 @@ bool wxIsBusy()
|
|||||||
return (wxBusyCursorCount > 0);
|
return (wxBusyCursorCount > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
wxString wxMacFindFolder( short vol,
|
wxString wxMacFindFolder( short vol,
|
||||||
OSType folderType,
|
OSType folderType,
|
||||||
Boolean createFolder)
|
Boolean createFolder)
|
||||||
@@ -336,7 +336,7 @@ wxString wxMacFindFolder( short vol,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
char *wxGetUserHome (const wxString& user)
|
char *wxGetUserHome (const wxString& user)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include "wx/unix/execute.h"
|
#include "wx/unix/execute.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#define wxEXECUTE_WIN_MESSAGE 10000
|
#define wxEXECUTE_WIN_MESSAGE 10000
|
||||||
|
|
||||||
long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
||||||
@@ -32,7 +32,7 @@ long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
|
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready"));
|
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready"));
|
||||||
|
@@ -38,7 +38,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
|
|||||||
#define twips2mm 0.0176388888889
|
#define twips2mm 0.0176388888889
|
||||||
#define mm2pt 2.83464566929
|
#define mm2pt 2.83464566929
|
||||||
#define pt2mm 0.352777777778
|
#define pt2mm 0.352777777778
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
const double M_PI = 3.14159265358979 ;
|
const double M_PI = 3.14159265358979 ;
|
||||||
#endif
|
#endif
|
||||||
const double RAD2DEG = 180.0 / M_PI;
|
const double RAD2DEG = 180.0 / M_PI;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "wx/cmndata.h"
|
#include "wx/cmndata.h"
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
#ifdef __DARWIN__
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#else
|
#else
|
||||||
#include <Navigation.h>
|
#include <Navigation.h>
|
||||||
|
@@ -36,11 +36,11 @@
|
|||||||
#include "wx/dir.h"
|
#include "wx/dir.h"
|
||||||
#include "wx/filefn.h" // for wxPathExists()
|
#include "wx/filefn.h" // for wxPathExists()
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WXMAC__) && !defined(__UNIX__)
|
#ifndef __DARWIN__
|
||||||
#include "morefile.h"
|
#include "morefile.h"
|
||||||
#include "moreextr.h"
|
#include "moreextr.h"
|
||||||
#include "fullpath.h"
|
#include "fullpath.h"
|
||||||
@@ -118,7 +118,7 @@ wxDirData::wxDirData(const wxString& dirname)
|
|||||||
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
m_CPB.hFileInfo.ioNamePtr = m_name ;
|
||||||
m_index = 0 ;
|
m_index = 0 ;
|
||||||
|
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
// TODO: what are we supposed to do for Mac OS X
|
// TODO: what are we supposed to do for Mac OS X
|
||||||
#else
|
#else
|
||||||
FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
FSpGetDirectoryID( &fsspec , &m_dirId , &m_isDir ) ;
|
||||||
|
@@ -39,7 +39,7 @@ wxDropTarget::~wxDropTarget()
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxTextDropTarget
|
// wxTextDropTarget
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData )
|
bool wxTextDropTarget::OnDrop( wxCoord x, wxCoord y, const void *pData )
|
||||||
{
|
{
|
||||||
OnDropText( x, y, (const char*)pData );
|
OnDropText( x, y, (const char*)pData );
|
||||||
@@ -54,7 +54,7 @@ bool wxTextDropTarget::OnDropText( wxCoord x, wxCoord y, const wxString &psz )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
size_t wxTextDropTarget::GetFormatCount() const
|
size_t wxTextDropTarget::GetFormatCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -70,7 +70,7 @@ wxDataFormat wxTextDropTarget::GetFormat(size_t WXUNUSED(n)) const
|
|||||||
// wxFileDropTarget
|
// wxFileDropTarget
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] )
|
bool wxFileDropTarget::OnDropFiles( wxCoord x, wxCoord y, size_t nFiles, const char * const WXUNUSED(aszFiles)[] )
|
||||||
{
|
{
|
||||||
printf( "Got %d dropped files.\n", (int)nFiles );
|
printf( "Got %d dropped files.\n", (int)nFiles );
|
||||||
@@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDrop(wxCoord x, wxCoord y, const wxArrayString& filenam
|
|||||||
return OnDropFiles(x, y, 1, &filenames);
|
return OnDropFiles(x, y, 1, &filenames);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
size_t wxFileDropTarget::GetFormatCount() const
|
size_t wxFileDropTarget::GetFormatCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
@@ -80,7 +80,7 @@ void wxCYield() ;
|
|||||||
#define qDebug2 1
|
#define qDebug2 1
|
||||||
extern pascal void OTDebugStr(const char* str);
|
extern pascal void OTDebugStr(const char* str);
|
||||||
#endif
|
#endif
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#include <OTDebug.h>
|
#include <OTDebug.h>
|
||||||
#endif
|
#endif
|
||||||
InetSvcRef gInetSvcRef = 0 ;
|
InetSvcRef gInetSvcRef = 0 ;
|
||||||
@@ -121,7 +121,7 @@ OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode)
|
|||||||
ret.opt.maxlen = kOTFourByteOptionSize;
|
ret.opt.maxlen = kOTFourByteOptionSize;
|
||||||
|
|
||||||
opt->level = INET_IP; // dealing with an IP Level function
|
opt->level = INET_IP; // dealing with an IP Level function
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
opt->name = kIP_REUSEADDR;
|
opt->name = kIP_REUSEADDR;
|
||||||
#else
|
#else
|
||||||
opt->name = IP_REUSEADDR;
|
opt->name = IP_REUSEADDR;
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include "ldef/extldef.h"
|
#include "ldef/extldef.h"
|
||||||
#else
|
#else
|
||||||
#include "extldef.h"
|
#include "extldef.h"
|
||||||
|
@@ -56,7 +56,7 @@ const short kwxMacAppleMenuId = 1 ;
|
|||||||
|
|
||||||
// Construct a menu with optional title (then use append)
|
// Construct a menu with optional title (then use append)
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
short wxMenu::s_macNextMenuId = 3 ;
|
short wxMenu::s_macNextMenuId = 3 ;
|
||||||
#else
|
#else
|
||||||
short wxMenu::s_macNextMenuId = 2 ;
|
short wxMenu::s_macNextMenuId = 2 ;
|
||||||
@@ -450,7 +450,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
else if ( macMenuId == kHMHelpMenuID )
|
else if ( macMenuId == kHMHelpMenuID )
|
||||||
{
|
{
|
||||||
int menuItem = formerHelpMenuItems ;
|
int menuItem = formerHelpMenuItems ;
|
||||||
@@ -499,7 +499,7 @@ bool wxMenu::MacMenuSelect( wxEvtHandler* handler, long when , int macMenuId, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // __WXMAC_X__
|
#endif // __DARWIN__
|
||||||
|
|
||||||
for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++)
|
for (pos = 0, node = GetMenuItems().First(); node; node = node->Next(), pos++)
|
||||||
{
|
{
|
||||||
@@ -898,7 +898,7 @@ void wxMenuBar::MacMenuSelect(wxEvtHandler* handler, long when , int macMenuId,
|
|||||||
for (int i = 0; i < m_menus.GetCount() ; i++)
|
for (int i = 0; i < m_menus.GetCount() ; i++)
|
||||||
{
|
{
|
||||||
if ( m_menus[i]->MacGetMenuId() == macMenuId
|
if ( m_menus[i]->MacGetMenuId() == macMenuId
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
||
|
||
|
||||||
( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) )
|
( macMenuId == kHMHelpMenuID && ( m_titles[i] == "?" || m_titles[i] == "&?" || m_titles[i] == wxApp::s_macHelpMenuTitleName ) )
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
// check that the page index is valid
|
// check that the page index is valid
|
||||||
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
|
||||||
|
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
|
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
|
||||||
const short kwxMacTabLeftMargin = 20 ;
|
const short kwxMacTabLeftMargin = 20 ;
|
||||||
const short kwxMacTabTopMargin = 38 ;
|
const short kwxMacTabTopMargin = 38 ;
|
||||||
@@ -76,7 +76,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
|
|||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void wxNotebook::Init()
|
void wxNotebook::Init()
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC_X__
|
#ifdef __DARWIN__
|
||||||
m_macHorizontalBorder = 7;
|
m_macHorizontalBorder = 7;
|
||||||
m_macVerticalBorder = 8;
|
m_macVerticalBorder = 8;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
# include <fstream>
|
# include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMAC_X__
|
#ifndef __DARWIN__
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#pragma implementation "textctrl.h"
|
#pragma implementation "textctrl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#else
|
#else
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
#if defined(__BORLANDC__) && !defined(__WIN32__)
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__WXMAC_X__)
|
#elif !defined(__MWERKS__) && !defined(__GNUWIN32) && !defined(__DARWIN__)
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
#include "wx/mac/aga.h"
|
#include "wx/mac/aga.h"
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#include <Navigation.h>
|
#include <Navigation.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
#endif // UMA_USE_WINDOWMGR
|
#endif // UMA_USE_WINDOWMGR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
// Call currently implicitely done : InitFloatingWindows() ;
|
// Call currently implicitely done : InitFloatingWindows() ;
|
||||||
#else
|
#else
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
// defined in unix/utilsunx.cpp for Mac OS X
|
// defined in unix/utilsunx.cpp for Mac OS X
|
||||||
|
|
||||||
// get full hostname (with domain name if possible)
|
// get full hostname (with domain name if possible)
|
||||||
@@ -178,7 +178,7 @@ void wxFatalError(const wxString& msg, const wxString& title)
|
|||||||
wxMessageBox(wxBuffer);
|
wxMessageBox(wxBuffer);
|
||||||
wxExit();
|
wxExit();
|
||||||
}
|
}
|
||||||
#endif // !__UNIX__
|
#endif // !__DARWIN__
|
||||||
|
|
||||||
// Emit a beeeeeep
|
// Emit a beeeeeep
|
||||||
void wxBell()
|
void wxBell()
|
||||||
@@ -315,7 +315,7 @@ bool wxIsBusy()
|
|||||||
return (wxBusyCursorCount > 0);
|
return (wxBusyCursorCount > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
wxString wxMacFindFolder( short vol,
|
wxString wxMacFindFolder( short vol,
|
||||||
OSType folderType,
|
OSType folderType,
|
||||||
Boolean createFolder)
|
Boolean createFolder)
|
||||||
@@ -336,7 +336,7 @@ wxString wxMacFindFolder( short vol,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
char *wxGetUserHome (const wxString& user)
|
char *wxGetUserHome (const wxString& user)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
#include "wx/unix/execute.h"
|
#include "wx/unix/execute.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef __UNIX__
|
#ifndef __DARWIN__
|
||||||
#define wxEXECUTE_WIN_MESSAGE 10000
|
#define wxEXECUTE_WIN_MESSAGE 10000
|
||||||
|
|
||||||
long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
||||||
@@ -32,7 +32,7 @@ long wxExecute(const wxString& command, bool sync, wxProcess *handler)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __DARWIN__
|
||||||
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
|
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready"));
|
wxFAIL_MSG(wxT("wxAddProcessCallback() function not ready"));
|
||||||
|
Reference in New Issue
Block a user