Move more stuff into base for wxMac so that two level namespace dylibs
can be used on OS X. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
2736
Makefile.in
2736
Makefile.in
File diff suppressed because it is too large
Load Diff
@@ -109,10 +109,14 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/mac/mimetmac.cpp
|
src/mac/mimetmac.cpp
|
||||||
src/unix/baseunix.cpp
|
src/unix/baseunix.cpp
|
||||||
src/mac/utilsexc.cpp
|
src/mac/utilsexc.cpp
|
||||||
|
src/mac/thread.cpp
|
||||||
|
src/mac/macnotfy.cpp
|
||||||
|
src/mac/morefilex/MoreFilesX.c
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
<set var="BASE_AND_GUI_MAC_SRC" hints="files">
|
<set var="BASE_AND_GUI_MAC_SRC" hints="files">
|
||||||
src/mac/utils.cpp
|
src/mac/utils.cpp
|
||||||
|
src/mac/uma.cpp
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
<set var="BASE_MAC_HDR" hints="files">
|
<set var="BASE_MAC_HDR" hints="files">
|
||||||
@@ -1546,13 +1550,11 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/mac/gdiobj.cpp
|
src/mac/gdiobj.cpp
|
||||||
src/mac/icon.cpp
|
src/mac/icon.cpp
|
||||||
src/mac/listbox.cpp
|
src/mac/listbox.cpp
|
||||||
src/mac/macnotfy.cpp
|
|
||||||
src/mac/mdi.cpp
|
src/mac/mdi.cpp
|
||||||
src/mac/menu.cpp
|
src/mac/menu.cpp
|
||||||
src/mac/menuitem.cpp
|
src/mac/menuitem.cpp
|
||||||
src/mac/metafile.cpp
|
src/mac/metafile.cpp
|
||||||
src/mac/minifram.cpp
|
src/mac/minifram.cpp
|
||||||
src/mac/morefilex/MoreFilesX.c
|
|
||||||
src/mac/msgdlg.cpp
|
src/mac/msgdlg.cpp
|
||||||
src/mac/notebmac.cpp
|
src/mac/notebmac.cpp
|
||||||
src/mac/palette.cpp
|
src/mac/palette.cpp
|
||||||
@@ -1575,12 +1577,10 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/mac/stattext.cpp
|
src/mac/stattext.cpp
|
||||||
src/mac/tabctrl.cpp
|
src/mac/tabctrl.cpp
|
||||||
src/mac/textctrl.cpp
|
src/mac/textctrl.cpp
|
||||||
src/mac/thread.cpp
|
|
||||||
src/mac/timer.cpp
|
src/mac/timer.cpp
|
||||||
src/mac/toolbar.cpp
|
src/mac/toolbar.cpp
|
||||||
src/mac/tooltip.cpp
|
src/mac/tooltip.cpp
|
||||||
src/mac/toplevel.cpp
|
src/mac/toplevel.cpp
|
||||||
src/mac/uma.cpp
|
|
||||||
src/mac/window.cpp
|
src/mac/window.cpp
|
||||||
<!-- Generic implementations used by wxMac: -->
|
<!-- Generic implementations used by wxMac: -->
|
||||||
src/generic/caret.cpp
|
src/generic/caret.cpp
|
||||||
|
@@ -291,6 +291,12 @@ public:
|
|||||||
int argc;
|
int argc;
|
||||||
wxChar **argv;
|
wxChar **argv;
|
||||||
|
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
// This is needed in the wxAppConsole class because it is refereced from
|
||||||
|
// the wxBase library
|
||||||
|
static bool s_macDefaultEncodingIsPC ;
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// the function which creates the traits object when GetTraits() needs it
|
// the function which creates the traits object when GetTraits() needs it
|
||||||
// for the first time
|
// for the first time
|
||||||
|
@@ -43,7 +43,7 @@ bool WXDLLEXPORT wxYield();
|
|||||||
class WXDLLEXPORT wxApp: public wxAppBase
|
class WXDLLEXPORT wxApp: public wxAppBase
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||||
|
|
||||||
wxApp();
|
wxApp();
|
||||||
virtual ~wxApp() {}
|
virtual ~wxApp() {}
|
||||||
|
|
||||||
@@ -57,10 +57,10 @@ class WXDLLEXPORT wxApp: public wxAppBase
|
|||||||
|
|
||||||
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
||||||
virtual void WakeUpIdle();
|
virtual void WakeUpIdle();
|
||||||
|
|
||||||
virtual void SetPrintMode(int mode) { m_printMode = mode; }
|
virtual void SetPrintMode(int mode) { m_printMode = mode; }
|
||||||
virtual int GetPrintMode() const { return m_printMode; }
|
virtual int GetPrintMode() const { return m_printMode; }
|
||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
// setting up all MacOS Specific Event-Handlers etc
|
// setting up all MacOS Specific Event-Handlers etc
|
||||||
virtual bool OnInitGui();
|
virtual bool OnInitGui();
|
||||||
@@ -69,11 +69,11 @@ class WXDLLEXPORT wxApp: public wxAppBase
|
|||||||
void OnIdle(wxIdleEvent& event);
|
void OnIdle(wxIdleEvent& event);
|
||||||
void OnEndSession(wxCloseEvent& event);
|
void OnEndSession(wxCloseEvent& event);
|
||||||
void OnQueryEndSession(wxCloseEvent& event);
|
void OnQueryEndSession(wxCloseEvent& event);
|
||||||
|
|
||||||
// Windows only, but for compatibility...
|
// Windows only, but for compatibility...
|
||||||
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
|
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
|
||||||
inline bool GetAuto3D() const { return m_auto3D; }
|
inline bool GetAuto3D() const { return m_auto3D; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_showOnInit;
|
bool m_showOnInit;
|
||||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
// Implementation
|
// Implementation
|
||||||
virtual bool Initialize(int& argc, wxChar **argv);
|
virtual bool Initialize(int& argc, wxChar **argv);
|
||||||
virtual void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
bool IsExiting() { return !m_keepGoing ; }
|
bool IsExiting() { return !m_keepGoing ; }
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
// the installed application event handler
|
// the installed application event handler
|
||||||
@@ -100,9 +100,9 @@ public:
|
|||||||
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
|
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
|
||||||
static WXHRGN s_macCursorRgn ;
|
static WXHRGN s_macCursorRgn ;
|
||||||
static long s_lastModifiers ;
|
static long s_lastModifiers ;
|
||||||
|
|
||||||
int m_nCmdShow;
|
int m_nCmdShow;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_keepGoing ;
|
bool m_keepGoing ;
|
||||||
|
|
||||||
@@ -114,7 +114,6 @@ private:
|
|||||||
WXEVENTREF m_macCurrentEvent ;
|
WXEVENTREF m_macCurrentEvent ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool s_macDefaultEncodingIsPC ;
|
|
||||||
static bool s_macSupportPCMenuShortcuts ;
|
static bool s_macSupportPCMenuShortcuts ;
|
||||||
static long s_macAboutMenuItemId ;
|
static long s_macAboutMenuItemId ;
|
||||||
static long s_macPreferencesMenuItemId ;
|
static long s_macPreferencesMenuItemId ;
|
||||||
@@ -135,12 +134,12 @@ public:
|
|||||||
WXHRGN m_macCursorRgn ;
|
WXHRGN m_macCursorRgn ;
|
||||||
WXHRGN m_macSleepRgn ;
|
WXHRGN m_macSleepRgn ;
|
||||||
WXHRGN m_macHelpRgn ;
|
WXHRGN m_macHelpRgn ;
|
||||||
|
|
||||||
virtual void MacSuspend( bool convertClipboard ) ;
|
virtual void MacSuspend( bool convertClipboard ) ;
|
||||||
virtual void MacResume( bool convertClipboard ) ;
|
virtual void MacResume( bool convertClipboard ) ;
|
||||||
virtual void MacConvertPrivateToPublicScrap() ;
|
virtual void MacConvertPrivateToPublicScrap() ;
|
||||||
virtual void MacConvertPublicToPrivateScrap() ;
|
virtual void MacConvertPublicToPrivateScrap() ;
|
||||||
|
|
||||||
void MacDoOneEvent() ;
|
void MacDoOneEvent() ;
|
||||||
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
|
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
|
||||||
void MacHandleOneEvent( WXEVENTREF ev ) ;
|
void MacHandleOneEvent( WXEVENTREF ev ) ;
|
||||||
@@ -158,12 +157,12 @@ public:
|
|||||||
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
|
||||||
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
|
virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
virtual void MacHandleMouseMovedEvent( wxInt32 x , wxInt32 y ,wxUint32 modifiers , long timestamp ) ;
|
virtual void MacHandleMouseMovedEvent( wxInt32 x , wxInt32 y ,wxUint32 modifiers , long timestamp ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MacHandleMenuCommand( wxUint32 command ) ;
|
void MacHandleMenuCommand( wxUint32 command ) ;
|
||||||
bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
|
bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
|
||||||
bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
|
bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey ) ;
|
||||||
|
|
||||||
@@ -171,7 +170,7 @@ public:
|
|||||||
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
|
|
||||||
// in response of an open-document apple event
|
// in response of an open-document apple event
|
||||||
virtual void MacOpenFile(const wxString &fileName) ;
|
virtual void MacOpenFile(const wxString &fileName) ;
|
||||||
// in response of a print-document apple event
|
// in response of a print-document apple event
|
||||||
@@ -191,8 +190,8 @@ public:
|
|||||||
// opaque pointer for CFragInitBlock
|
// opaque pointer for CFragInitBlock
|
||||||
static void OpenSharedLibraryResource(const void *) ;
|
static void OpenSharedLibraryResource(const void *) ;
|
||||||
static void CloseSharedLibraryResource() ;
|
static void CloseSharedLibraryResource() ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
short m_currentRefNum ;
|
short m_currentRefNum ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 03/02/99
|
// Created: 03/02/99
|
||||||
// RCS-ID: $Id:
|
// RCS-ID: $Id:
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -22,13 +22,17 @@ long UMAGetAppearanceVersion() ;
|
|||||||
bool UMAHasWindowManager() ;
|
bool UMAHasWindowManager() ;
|
||||||
long UMAGetWindowManagerAttr() ;
|
long UMAGetWindowManagerAttr() ;
|
||||||
bool UMAHasAquaLayout() ;
|
bool UMAHasAquaLayout() ;
|
||||||
|
|
||||||
bool UMASystemIsInitialized() ;
|
bool UMASystemIsInitialized() ;
|
||||||
|
void UMASetSystemIsInitialized(bool val);
|
||||||
|
|
||||||
// process manager
|
// process manager
|
||||||
|
|
||||||
long UMAGetProcessMode() ;
|
long UMAGetProcessMode() ;
|
||||||
bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
|
bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
// menu manager
|
// menu manager
|
||||||
|
|
||||||
MenuRef UMANewMenu( SInt16 id , const wxString& title ) ;
|
MenuRef UMANewMenu( SInt16 id , const wxString& title ) ;
|
||||||
@@ -121,6 +125,8 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
|
|||||||
// calls not in carbon
|
// calls not in carbon
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
|
#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -93,6 +93,10 @@ wxAppConsole *wxAppConsole::ms_appInstance = NULL;
|
|||||||
|
|
||||||
wxAppInitializerFunction wxAppConsole::ms_appInitFn = NULL;
|
wxAppInitializerFunction wxAppConsole::ms_appInitFn = NULL;
|
||||||
|
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
bool wxAppConsole::s_macDefaultEncodingIsPC = true ;
|
||||||
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxAppConsole implementation
|
// wxAppConsole implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -371,10 +375,10 @@ bool wxAppConsole::CheckBuildOptions(const char *optionsSignature,
|
|||||||
wxString prog = wxString::FromAscii(optionsSignature);
|
wxString prog = wxString::FromAscii(optionsSignature);
|
||||||
wxString progName = wxString::FromAscii(componentName);
|
wxString progName = wxString::FromAscii(componentName);
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
|
msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
|
||||||
lib.c_str(), progName.c_str(), prog.c_str());
|
lib.c_str(), progName.c_str(), prog.c_str());
|
||||||
|
|
||||||
wxLogFatalError(msg);
|
wxLogFatalError(msg);
|
||||||
|
|
||||||
// normally wxLogFatalError doesn't return
|
// normally wxLogFatalError doesn't return
|
||||||
@@ -456,7 +460,7 @@ void wxConsoleAppTraitsBase::RemoveFromPendingDelete(wxObject * WXUNUSED(object)
|
|||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_SOCKETS
|
#if wxUSE_SOCKETS
|
||||||
GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()
|
GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()
|
||||||
{
|
{
|
||||||
@@ -533,7 +537,7 @@ void wxAssert(int cond,
|
|||||||
const wxChar *szFile,
|
const wxChar *szFile,
|
||||||
int nLine,
|
int nLine,
|
||||||
const wxChar *szCond,
|
const wxChar *szCond,
|
||||||
const wxChar *szMsg)
|
const wxChar *szMsg)
|
||||||
{
|
{
|
||||||
if ( !cond )
|
if ( !cond )
|
||||||
wxOnAssert(szFile, nLine, szCond, szMsg);
|
wxOnAssert(szFile, nLine, szCond, szMsg);
|
||||||
|
@@ -104,7 +104,6 @@ long wxApp::sm_lastMessageTime = 0;
|
|||||||
long wxApp::s_lastModifiers = 0 ;
|
long wxApp::s_lastModifiers = 0 ;
|
||||||
|
|
||||||
|
|
||||||
bool wxApp::s_macDefaultEncodingIsPC = true ;
|
|
||||||
bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
||||||
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
||||||
long wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
|
long wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
|
||||||
@@ -1561,7 +1560,7 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
|||||||
{
|
{
|
||||||
// Activate window first
|
// Activate window first
|
||||||
::SelectWindow( window ) ;
|
::SelectWindow( window ) ;
|
||||||
|
|
||||||
// Send event later
|
// Send event later
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseDown( ev , windowPart ) ;
|
win->MacMouseDown( ev , windowPart ) ;
|
||||||
@@ -2177,7 +2176,7 @@ void wxApp::MacHandleMouseMovedEvent(wxInt32 x , wxInt32 y ,wxUint32 modifiers ,
|
|||||||
event.m_controlDown = modifiers & controlKey;
|
event.m_controlDown = modifiers & controlKey;
|
||||||
event.m_altDown = modifiers & optionKey;
|
event.m_altDown = modifiers & optionKey;
|
||||||
event.m_metaDown = modifiers & cmdKey;
|
event.m_metaDown = modifiers & cmdKey;
|
||||||
|
|
||||||
event.m_x = x;
|
event.m_x = x;
|
||||||
event.m_y = y;
|
event.m_y = y;
|
||||||
event.m_timeStamp = timestamp;
|
event.m_timeStamp = timestamp;
|
||||||
|
@@ -104,7 +104,6 @@ long wxApp::sm_lastMessageTime = 0;
|
|||||||
long wxApp::s_lastModifiers = 0 ;
|
long wxApp::s_lastModifiers = 0 ;
|
||||||
|
|
||||||
|
|
||||||
bool wxApp::s_macDefaultEncodingIsPC = true ;
|
|
||||||
bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
bool wxApp::s_macSupportPCMenuShortcuts = true ;
|
||||||
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
long wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
|
||||||
long wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
|
long wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
|
||||||
@@ -1561,7 +1560,7 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
|
|||||||
{
|
{
|
||||||
// Activate window first
|
// Activate window first
|
||||||
::SelectWindow( window ) ;
|
::SelectWindow( window ) ;
|
||||||
|
|
||||||
// Send event later
|
// Send event later
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacMouseDown( ev , windowPart ) ;
|
win->MacMouseDown( ev , windowPart ) ;
|
||||||
@@ -2177,7 +2176,7 @@ void wxApp::MacHandleMouseMovedEvent(wxInt32 x , wxInt32 y ,wxUint32 modifiers ,
|
|||||||
event.m_controlDown = modifiers & controlKey;
|
event.m_controlDown = modifiers & controlKey;
|
||||||
event.m_altDown = modifiers & optionKey;
|
event.m_altDown = modifiers & optionKey;
|
||||||
event.m_metaDown = modifiers & cmdKey;
|
event.m_metaDown = modifiers & cmdKey;
|
||||||
|
|
||||||
event.m_x = x;
|
event.m_x = x;
|
||||||
event.m_y = y;
|
event.m_y = y;
|
||||||
event.m_timeStamp = timestamp;
|
event.m_timeStamp = timestamp;
|
||||||
|
@@ -37,10 +37,12 @@
|
|||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
#include <Threads.h>
|
#include <Threads.h>
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
#include "wx/mac/macnotfy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INFINITE 0xFFFFFFFF
|
#define INFINITE 0xFFFFFFFF
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -257,12 +259,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IsOk() const { return m_mutex.IsOk() ; }
|
bool IsOk() const { return m_mutex.IsOk() ; }
|
||||||
|
|
||||||
wxCondError Wait()
|
wxCondError Wait()
|
||||||
{
|
{
|
||||||
return WaitTimeout(0xFFFFFFFF );
|
return WaitTimeout(0xFFFFFFFF );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCondError WaitTimeout(unsigned long msectimeout)
|
wxCondError WaitTimeout(unsigned long msectimeout)
|
||||||
{
|
{
|
||||||
wxMacStCritical critical ;
|
wxMacStCritical critical ;
|
||||||
@@ -300,7 +302,7 @@ public:
|
|||||||
{
|
{
|
||||||
wxMacStCritical critical ;
|
wxMacStCritical critical ;
|
||||||
return wxCOND_NO_ERROR;
|
return wxCOND_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayLong m_waiters ;
|
wxArrayLong m_waiters ;
|
||||||
wxInt32 m_excessSignals ;
|
wxInt32 m_excessSignals ;
|
||||||
@@ -844,7 +846,7 @@ bool wxThreadModule::OnInit()
|
|||||||
#endif
|
#endif
|
||||||
if ( !hasThreadManager )
|
if ( !hasThreadManager )
|
||||||
{
|
{
|
||||||
wxMessageBox( wxT("Error") , wxT("Thread Support is not available on this System") , wxOK ) ;
|
wxLogSysError( wxT("Thread Support is not available on this System") );
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,6 +10,9 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
|
|
||||||
@@ -30,6 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
|
|
||||||
// since we have decided that we only support 8.6 upwards we are
|
// since we have decided that we only support 8.6 upwards we are
|
||||||
// checking for these minimum requirements in the startup code of
|
// checking for these minimum requirements in the startup code of
|
||||||
// the application so all wxWindows code can safely assume that appearance 1.1
|
// the application so all wxWindows code can safely assume that appearance 1.1
|
||||||
@@ -40,7 +44,6 @@ static bool sUMAHasAppearance = false ;
|
|||||||
static long sUMAAppearanceVersion = 0 ;
|
static long sUMAAppearanceVersion = 0 ;
|
||||||
static long sUMASystemVersion = 0 ;
|
static long sUMASystemVersion = 0 ;
|
||||||
static bool sUMAHasAquaLayout = false ;
|
static bool sUMAHasAquaLayout = false ;
|
||||||
static bool sUMASystemInitialized = false ;
|
|
||||||
|
|
||||||
extern int gAGABackgroundColor ;
|
extern int gAGABackgroundColor ;
|
||||||
bool UMAHasAppearance() { return sUMAHasAppearance ; }
|
bool UMAHasAppearance() { return sUMAHasAppearance ; }
|
||||||
@@ -53,7 +56,7 @@ static long sUMAWindowManagerAttr = 0 ;
|
|||||||
bool UMAHasWindowManager() { return sUMAHasWindowManager ; }
|
bool UMAHasWindowManager() { return sUMAHasWindowManager ; }
|
||||||
long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; }
|
long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; }
|
||||||
bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; }
|
bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; }
|
||||||
bool UMASystemIsInitialized() { return sUMASystemInitialized ; }
|
|
||||||
|
|
||||||
void UMACleanupToolbox()
|
void UMACleanupToolbox()
|
||||||
{
|
{
|
||||||
@@ -158,7 +161,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sUMASystemInitialized = true ;
|
UMASetSystemIsInitialized(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +298,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
|
|||||||
// for some reasons this must be 0 right now
|
// for some reasons this must be 0 right now
|
||||||
// everything else leads to just the first function key item
|
// everything else leads to just the first function key item
|
||||||
// to be selected. Thanks to Ryan Wilcox for finding out.
|
// to be selected. Thanks to Ryan Wilcox for finding out.
|
||||||
macKey = 0 ;
|
macKey = 0 ;
|
||||||
glyph = kMenuF1Glyph + ( key - WXK_F1 ) ;
|
glyph = kMenuF1Glyph + ( key - WXK_F1 ) ;
|
||||||
if ( key >= WXK_F13 )
|
if ( key >= WXK_F13 )
|
||||||
glyph += 13 ;
|
glyph += 13 ;
|
||||||
@@ -777,3 +780,21 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data )
|
|||||||
return err ;
|
return err ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
|
static bool sUMASystemInitialized = false ;
|
||||||
|
|
||||||
|
bool UMASystemIsInitialized()
|
||||||
|
{
|
||||||
|
return sUMASystemInitialized ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UMASetSystemIsInitialized(bool val)
|
||||||
|
{
|
||||||
|
sUMASystemInitialized = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
@@ -359,6 +359,10 @@ bool wxIsBusy()
|
|||||||
return (gs_wxBusyCursorCount > 0);
|
return (gs_wxBusyCursorCount > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
wxString wxMacFindFolder( short vol,
|
wxString wxMacFindFolder( short vol,
|
||||||
OSType folderType,
|
OSType folderType,
|
||||||
Boolean createFolder)
|
Boolean createFolder)
|
||||||
@@ -378,6 +382,10 @@ wxString wxMacFindFolder( short vol,
|
|||||||
return strDir ;
|
return strDir ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
// Check whether this window wants to process messages, e.g. Stop button
|
// Check whether this window wants to process messages, e.g. Stop button
|
||||||
// in long calculations.
|
// in long calculations.
|
||||||
bool wxCheckForInterrupt(wxWindow *wnd)
|
bool wxCheckForInterrupt(wxWindow *wnd)
|
||||||
@@ -534,10 +542,6 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
}
|
}
|
||||||
#endif // !__DARWIN__
|
#endif // !__DARWIN__
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
|
||||||
|
|
||||||
#if wxUSE_GUI
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// wxMac Specific utility functions
|
// wxMac Specific utility functions
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -691,6 +695,7 @@ wxWCharBuffer wxMacStringToWString( const wxString &from )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString wxMacMakeStringFromCString( const char * from , int len )
|
wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||||
{
|
{
|
||||||
OSStatus status = noErr ;
|
OSStatus status = noErr ;
|
||||||
@@ -771,6 +776,11 @@ wxString wxMacMakeStringFromPascal( ConstStringPtr from )
|
|||||||
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// CFStringRefs (Carbon only)
|
// CFStringRefs (Carbon only)
|
||||||
//
|
//
|
||||||
|
@@ -37,10 +37,12 @@
|
|||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
#include <Threads.h>
|
#include <Threads.h>
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
#include "wx/mac/macnotfy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INFINITE 0xFFFFFFFF
|
#define INFINITE 0xFFFFFFFF
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -257,12 +259,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool IsOk() const { return m_mutex.IsOk() ; }
|
bool IsOk() const { return m_mutex.IsOk() ; }
|
||||||
|
|
||||||
wxCondError Wait()
|
wxCondError Wait()
|
||||||
{
|
{
|
||||||
return WaitTimeout(0xFFFFFFFF );
|
return WaitTimeout(0xFFFFFFFF );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCondError WaitTimeout(unsigned long msectimeout)
|
wxCondError WaitTimeout(unsigned long msectimeout)
|
||||||
{
|
{
|
||||||
wxMacStCritical critical ;
|
wxMacStCritical critical ;
|
||||||
@@ -300,7 +302,7 @@ public:
|
|||||||
{
|
{
|
||||||
wxMacStCritical critical ;
|
wxMacStCritical critical ;
|
||||||
return wxCOND_NO_ERROR;
|
return wxCOND_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayLong m_waiters ;
|
wxArrayLong m_waiters ;
|
||||||
wxInt32 m_excessSignals ;
|
wxInt32 m_excessSignals ;
|
||||||
@@ -844,7 +846,7 @@ bool wxThreadModule::OnInit()
|
|||||||
#endif
|
#endif
|
||||||
if ( !hasThreadManager )
|
if ( !hasThreadManager )
|
||||||
{
|
{
|
||||||
wxMessageBox( wxT("Error") , wxT("Thread Support is not available on this System") , wxOK ) ;
|
wxLogSysError( wxT("Thread Support is not available on this System") );
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,6 +10,9 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
|
|
||||||
@@ -30,6 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
|
|
||||||
// since we have decided that we only support 8.6 upwards we are
|
// since we have decided that we only support 8.6 upwards we are
|
||||||
// checking for these minimum requirements in the startup code of
|
// checking for these minimum requirements in the startup code of
|
||||||
// the application so all wxWindows code can safely assume that appearance 1.1
|
// the application so all wxWindows code can safely assume that appearance 1.1
|
||||||
@@ -40,7 +44,6 @@ static bool sUMAHasAppearance = false ;
|
|||||||
static long sUMAAppearanceVersion = 0 ;
|
static long sUMAAppearanceVersion = 0 ;
|
||||||
static long sUMASystemVersion = 0 ;
|
static long sUMASystemVersion = 0 ;
|
||||||
static bool sUMAHasAquaLayout = false ;
|
static bool sUMAHasAquaLayout = false ;
|
||||||
static bool sUMASystemInitialized = false ;
|
|
||||||
|
|
||||||
extern int gAGABackgroundColor ;
|
extern int gAGABackgroundColor ;
|
||||||
bool UMAHasAppearance() { return sUMAHasAppearance ; }
|
bool UMAHasAppearance() { return sUMAHasAppearance ; }
|
||||||
@@ -53,7 +56,7 @@ static long sUMAWindowManagerAttr = 0 ;
|
|||||||
bool UMAHasWindowManager() { return sUMAHasWindowManager ; }
|
bool UMAHasWindowManager() { return sUMAHasWindowManager ; }
|
||||||
long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; }
|
long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; }
|
||||||
bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; }
|
bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; }
|
||||||
bool UMASystemIsInitialized() { return sUMASystemInitialized ; }
|
|
||||||
|
|
||||||
void UMACleanupToolbox()
|
void UMACleanupToolbox()
|
||||||
{
|
{
|
||||||
@@ -158,7 +161,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sUMASystemInitialized = true ;
|
UMASetSystemIsInitialized(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +298,7 @@ void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEn
|
|||||||
// for some reasons this must be 0 right now
|
// for some reasons this must be 0 right now
|
||||||
// everything else leads to just the first function key item
|
// everything else leads to just the first function key item
|
||||||
// to be selected. Thanks to Ryan Wilcox for finding out.
|
// to be selected. Thanks to Ryan Wilcox for finding out.
|
||||||
macKey = 0 ;
|
macKey = 0 ;
|
||||||
glyph = kMenuF1Glyph + ( key - WXK_F1 ) ;
|
glyph = kMenuF1Glyph + ( key - WXK_F1 ) ;
|
||||||
if ( key >= WXK_F13 )
|
if ( key >= WXK_F13 )
|
||||||
glyph += 13 ;
|
glyph += 13 ;
|
||||||
@@ -777,3 +780,21 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data )
|
|||||||
return err ;
|
return err ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
|
static bool sUMASystemInitialized = false ;
|
||||||
|
|
||||||
|
bool UMASystemIsInitialized()
|
||||||
|
{
|
||||||
|
return sUMASystemInitialized ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UMASetSystemIsInitialized(bool val)
|
||||||
|
{
|
||||||
|
sUMASystemInitialized = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
@@ -359,6 +359,10 @@ bool wxIsBusy()
|
|||||||
return (gs_wxBusyCursorCount > 0);
|
return (gs_wxBusyCursorCount > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
wxString wxMacFindFolder( short vol,
|
wxString wxMacFindFolder( short vol,
|
||||||
OSType folderType,
|
OSType folderType,
|
||||||
Boolean createFolder)
|
Boolean createFolder)
|
||||||
@@ -378,6 +382,10 @@ wxString wxMacFindFolder( short vol,
|
|||||||
return strDir ;
|
return strDir ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
// Check whether this window wants to process messages, e.g. Stop button
|
// Check whether this window wants to process messages, e.g. Stop button
|
||||||
// in long calculations.
|
// in long calculations.
|
||||||
bool wxCheckForInterrupt(wxWindow *wnd)
|
bool wxCheckForInterrupt(wxWindow *wnd)
|
||||||
@@ -534,10 +542,6 @@ bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
|
|||||||
}
|
}
|
||||||
#endif // !__DARWIN__
|
#endif // !__DARWIN__
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
|
||||||
|
|
||||||
#if wxUSE_GUI
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// wxMac Specific utility functions
|
// wxMac Specific utility functions
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -691,6 +695,7 @@ wxWCharBuffer wxMacStringToWString( const wxString &from )
|
|||||||
return result ;
|
return result ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString wxMacMakeStringFromCString( const char * from , int len )
|
wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||||
{
|
{
|
||||||
OSStatus status = noErr ;
|
OSStatus status = noErr ;
|
||||||
@@ -771,6 +776,11 @@ wxString wxMacMakeStringFromPascal( ConstStringPtr from )
|
|||||||
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
return wxMacMakeStringFromCString( (char*) &from[1] , from[0] ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// CFStringRefs (Carbon only)
|
// CFStringRefs (Carbon only)
|
||||||
//
|
//
|
||||||
|
@@ -1166,6 +1166,9 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
void wxHandleProcessTermination(wxEndProcessData *proc_data)
|
void wxHandleProcessTermination(wxEndProcessData *proc_data)
|
||||||
{
|
{
|
||||||
// notify user about termination if required
|
// notify user about termination if required
|
||||||
@@ -1186,5 +1189,5 @@ void wxHandleProcessTermination(wxEndProcessData *proc_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
|
||||||
|
|
||||||
|
#endif // wxUSE_BASE
|
||||||
|
Reference in New Issue
Block a user