cleanup, fixing exports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -779,8 +779,6 @@ extern "C" void macPostedEventCallback(void *WXUNUSED(unused))
|
|||||||
wxTheApp->ProcessPendingEvents();
|
wxTheApp->ProcessPendingEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessSerialNumber gAppProcess ;
|
|
||||||
|
|
||||||
bool wxApp::Initialize(int& argc, wxChar **argv)
|
bool wxApp::Initialize(int& argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
// Mac-specific
|
// Mac-specific
|
||||||
@@ -791,7 +789,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
|
|
||||||
UMAInitToolbox( 4, sm_isEmbedded ) ;
|
UMAInitToolbox( 4, sm_isEmbedded ) ;
|
||||||
// TODO CHECK Can Be Removed SetEventMask( everyEvent ) ;
|
// TODO CHECK Can Be Removed SetEventMask( everyEvent ) ;
|
||||||
UMAShowWatchCursor() ;
|
|
||||||
|
|
||||||
// Mac OS X passes a process serial number command line argument when
|
// Mac OS X passes a process serial number command line argument when
|
||||||
// the application is launched from the Finder. This argument must be
|
// the application is launched from the Finder. This argument must be
|
||||||
@@ -811,8 +808,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
if ( !wxAppBase::Initialize(argc, argv) )
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
GetCurrentProcess(&gAppProcess);
|
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
||||||
#endif
|
#endif
|
||||||
@@ -839,8 +834,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
// run loop takes ownership
|
// run loop takes ownership
|
||||||
CFRelease(m_macEventPosted);
|
CFRelease(m_macEventPosted);
|
||||||
|
|
||||||
UMAShowArrowCursor() ;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -909,8 +902,6 @@ void wxApp::CleanUp()
|
|||||||
// One last chance for pending objects to be cleaned up
|
// One last chance for pending objects to be cleaned up
|
||||||
wxTheApp->DeletePendingObjects();
|
wxTheApp->DeletePendingObjects();
|
||||||
|
|
||||||
UMACleanupToolbox() ;
|
|
||||||
|
|
||||||
if (!sm_isEmbedded)
|
if (!sm_isEmbedded)
|
||||||
RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) );
|
RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) );
|
||||||
|
|
||||||
|
@@ -606,6 +606,8 @@ PicHandle wxBitmapRefData::GetPictHandle()
|
|||||||
return m_pictHandle ;
|
return m_pictHandle ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size);
|
||||||
|
|
||||||
void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t WXUNUSED(size))
|
void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t WXUNUSED(size))
|
||||||
{
|
{
|
||||||
wxMemoryBuffer* membuf = (wxMemoryBuffer*) info ;
|
wxMemoryBuffer* membuf = (wxMemoryBuffer*) info ;
|
||||||
|
@@ -80,7 +80,7 @@ void wxGLContext::SetCurrent(const wxGLCanvas& win) const
|
|||||||
if ( !m_aglContext )
|
if ( !m_aglContext )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AGLDrawable drawable = (AGLDrawable)UMAGetWindowPort(
|
AGLDrawable drawable = (AGLDrawable)GetWindowPort(
|
||||||
MAC_WXHWND(win.MacGetTopLevelWindowRef()));
|
MAC_WXHWND(win.MacGetTopLevelWindowRef()));
|
||||||
if ( !aglSetDrawable(m_aglContext, drawable) )
|
if ( !aglSetDrawable(m_aglContext, drawable) )
|
||||||
wxLogAGLError("aglSetDrawable");
|
wxLogAGLError("aglSetDrawable");
|
||||||
|
@@ -411,7 +411,7 @@ void wxToolBarTool::SetPosition( const wxPoint& position )
|
|||||||
|
|
||||||
if ( mac_x != former_mac_x || mac_y != former_mac_y )
|
if ( mac_x != former_mac_x || mac_y != former_mac_y )
|
||||||
{
|
{
|
||||||
UMAMoveControl( m_controlHandle, mac_x, mac_y );
|
::MoveControl( m_controlHandle, mac_x, mac_y );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( IsControl() )
|
else if ( IsControl() )
|
||||||
@@ -433,7 +433,7 @@ void wxToolBarTool::SetPosition( const wxPoint& position )
|
|||||||
int former_mac_y = contrlRect.top;
|
int former_mac_y = contrlRect.top;
|
||||||
|
|
||||||
if ( mac_x != former_mac_x || mac_y != former_mac_y )
|
if ( mac_x != former_mac_x || mac_y != former_mac_y )
|
||||||
UMAMoveControl( m_controlHandle, mac_x, mac_y );
|
::MoveControl( m_controlHandle, mac_x, mac_y );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1543,7 +1543,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
SetBevelButtonTextPlacement( m_controlHandle, kControlBevelButtonPlaceBelowGraphic );
|
SetBevelButtonTextPlacement( m_controlHandle, kControlBevelButtonPlaceBelowGraphic );
|
||||||
UMASetControlTitle( m_controlHandle, label, wxFont::GetDefaultEncoding() );
|
SetControlTitleWithCFString( m_controlHandle , wxMacCFStringHolder( label, wxFont::GetDefaultEncoding() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
InstallControlEventHandler(
|
InstallControlEventHandler(
|
||||||
@@ -1593,7 +1593,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
ControlRef container = (ControlRef) GetHandle();
|
ControlRef container = (ControlRef) GetHandle();
|
||||||
wxASSERT_MSG( container != NULL, wxT("No valid Mac container control") );
|
wxASSERT_MSG( container != NULL, wxT("No valid Mac container control") );
|
||||||
|
|
||||||
UMAShowControl( controlHandle );
|
SetControlVisibility( controlHandle, true, true );
|
||||||
::EmbedControl( controlHandle, container );
|
::EmbedControl( controlHandle, container );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -938,7 +938,7 @@ wxMacDeferredWindowDeleter::wxMacDeferredWindowDeleter( WindowRef windowRef )
|
|||||||
|
|
||||||
wxMacDeferredWindowDeleter::~wxMacDeferredWindowDeleter()
|
wxMacDeferredWindowDeleter::~wxMacDeferredWindowDeleter()
|
||||||
{
|
{
|
||||||
UMADisposeWindow( (WindowRef) m_macWindow ) ;
|
DisposeWindow( (WindowRef) m_macWindow ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMac::Create(wxWindow *parent,
|
bool wxTopLevelWindowMac::Create(wxWindow *parent,
|
||||||
@@ -1277,7 +1277,7 @@ void wxTopLevelWindowMac::DoMacCreateRealWindow(
|
|||||||
SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
|
SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
|
||||||
|
|
||||||
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
|
wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ;
|
||||||
UMASetWTitle( (WindowRef) m_macWindow , title , m_font.GetEncoding() ) ;
|
SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxMacCFStringHolder( title , m_font.GetEncoding() ) );
|
||||||
m_peer = new wxMacControl(this , true /*isRootControl*/) ;
|
m_peer = new wxMacControl(this , true /*isRootControl*/) ;
|
||||||
|
|
||||||
// There is a bug in 10.2.X for ::GetRootControl returning the window view instead of
|
// There is a bug in 10.2.X for ::GetRootControl returning the window view instead of
|
||||||
@@ -1374,7 +1374,7 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool WXUNUSED(inIsActiva
|
|||||||
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
||||||
{
|
{
|
||||||
wxWindow::SetLabel( title ) ;
|
wxWindow::SetLabel( title ) ;
|
||||||
UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ;
|
SetWindowTitleWithCFString( (WindowRef) m_macWindow , wxMacCFStringHolder( title , m_font.GetEncoding() ) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxTopLevelWindowMac::GetTitle() const
|
wxString wxTopLevelWindowMac::GetTitle() const
|
||||||
|
@@ -20,27 +20,21 @@
|
|||||||
|
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
// since we have decided that we only support 8.6 upwards we are
|
|
||||||
// checking for these minimum requirements in the startup code of
|
|
||||||
// the application so all wxWidgets code can safely assume that appearance 1.1
|
|
||||||
// windows manager, control manager, navigation services etc. are
|
|
||||||
// present
|
|
||||||
|
|
||||||
static SInt32 sUMASystemVersion = 0 ;
|
static SInt32 sUMASystemVersion = 0 ;
|
||||||
|
|
||||||
long UMAGetSystemVersion() { return sUMASystemVersion ; }
|
long UMAGetSystemVersion()
|
||||||
|
{
|
||||||
void UMACleanupToolbox()
|
if ( sUMASystemVersion == 0 )
|
||||||
{
|
{
|
||||||
|
verify_noerr(Gestalt(gestaltSystemVersion, &sUMASystemVersion));
|
||||||
|
}
|
||||||
|
return sUMASystemVersion ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAInitToolbox( UInt16 WXUNUSED(inMoreMastersCalls),
|
void UMAInitToolbox( UInt16 WXUNUSED(inMoreMastersCalls),
|
||||||
bool WXUNUSED(isEmbedded) )
|
bool WXUNUSED(isEmbedded) )
|
||||||
{
|
{
|
||||||
if ( Gestalt(gestaltSystemVersion, &sUMASystemVersion) != noErr)
|
#if 0 // ndef __LP64__
|
||||||
sUMASystemVersion = 0x0000 ;
|
|
||||||
|
|
||||||
#ifndef __LP64__
|
|
||||||
{
|
{
|
||||||
FontFamilyID fontId ;
|
FontFamilyID fontId ;
|
||||||
Str255 fontName ;
|
Str255 fontName ;
|
||||||
@@ -58,14 +52,9 @@ void UMAInitToolbox( UInt16 WXUNUSED(inMoreMastersCalls),
|
|||||||
|
|
||||||
OptionBits options = 0 ;
|
OptionBits options = 0 ;
|
||||||
|
|
||||||
if ( UMAGetSystemVersion() < 0x1000 )
|
|
||||||
options |= kTXNAlwaysUseQuickDrawTextMask ;
|
|
||||||
|
|
||||||
TXNInitTextension( fontDescriptions, noOfFontDescriptions, options );
|
TXNInitTextension( fontDescriptions, noOfFontDescriptions, options );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UMASetSystemIsInitialized( true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// process manager
|
// process manager
|
||||||
@@ -124,11 +113,6 @@ void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& titl
|
|||||||
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str , encoding) ) ;
|
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str , encoding) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt32 UMAMenuEvent( EventRecord *inEvent )
|
|
||||||
{
|
|
||||||
return MenuEvent( inEvent ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem , bool enable)
|
void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem , bool enable)
|
||||||
{
|
{
|
||||||
if ( enable )
|
if ( enable )
|
||||||
@@ -317,16 +301,6 @@ void UMAInsertMenuItem( MenuRef menu , const wxString& title, wxFontEncoding enc
|
|||||||
|
|
||||||
#if wxMAC_USE_COCOA == 0
|
#if wxMAC_USE_COCOA == 0
|
||||||
|
|
||||||
void UMAShowWatchCursor()
|
|
||||||
{
|
|
||||||
SetThemeCursor(kThemeWatchCursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMAShowArrowCursor()
|
|
||||||
{
|
|
||||||
SetThemeCursor(kThemeArrowCursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static OSStatus UMAGetHelpMenu(
|
static OSStatus UMAGetHelpMenu(
|
||||||
MenuRef * outHelpMenu,
|
MenuRef * outHelpMenu,
|
||||||
MenuItemIndex * outFirstCustomItemIndex,
|
MenuItemIndex * outFirstCustomItemIndex,
|
||||||
@@ -369,86 +343,21 @@ OSStatus UMAGetHelpMenuDontCreate(
|
|||||||
|
|
||||||
#if wxMAC_USE_QUICKDRAW
|
#if wxMAC_USE_QUICKDRAW
|
||||||
|
|
||||||
GrafPtr UMAGetWindowPort( WindowRef inWindowRef )
|
|
||||||
{
|
|
||||||
wxASSERT( inWindowRef != NULL ) ;
|
|
||||||
|
|
||||||
return (GrafPtr) GetWindowPort( inWindowRef ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMADisposeWindow( WindowRef inWindowRef )
|
|
||||||
{
|
|
||||||
wxASSERT( inWindowRef != NULL ) ;
|
|
||||||
|
|
||||||
DisposeWindow( inWindowRef ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding )
|
|
||||||
{
|
|
||||||
SetWindowTitleWithCFString( inWindowRef , wxMacCFStringHolder(title , encoding) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// appearance additions
|
|
||||||
|
|
||||||
void UMASetControlTitle( ControlRef inControl , const wxString& title , wxFontEncoding encoding )
|
|
||||||
{
|
|
||||||
SetControlTitleWithCFString( inControl , wxMacCFStringHolder(title , encoding) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMAActivateControl( ControlRef inControl )
|
void UMAActivateControl( ControlRef inControl )
|
||||||
{
|
{
|
||||||
::ActivateControl( inControl ) ;
|
::ActivateControl( inControl ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMAMoveControl( ControlRef inControl , short x , short y )
|
|
||||||
{
|
|
||||||
::MoveControl( inControl , x , y ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMASizeControl( ControlRef inControl , short x , short y )
|
|
||||||
{
|
|
||||||
::SizeControl( inControl , x , y ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMADeactivateControl( ControlRef inControl )
|
void UMADeactivateControl( ControlRef inControl )
|
||||||
{
|
{
|
||||||
::DeactivateControl( inControl ) ;
|
::DeactivateControl( inControl ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shows the control and adds the region to the update region
|
|
||||||
void UMAShowControl( ControlRef inControl )
|
|
||||||
{
|
|
||||||
SetControlVisibility( inControl , true , false ) ;
|
|
||||||
HIViewSetNeedsDisplay( inControl, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
// hides the control and adds the region to the update region
|
|
||||||
void UMAHideControl( ControlRef inControl )
|
|
||||||
{
|
|
||||||
SetControlVisibility( inControl , false , false ) ;
|
|
||||||
HIViewSetNeedsDisplay( inControl, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UMAIsWindowFloating( WindowRef inWindow )
|
|
||||||
{
|
|
||||||
WindowClass cl ;
|
|
||||||
|
|
||||||
GetWindowClass( inWindow , &cl ) ;
|
|
||||||
return cl == kFloatingWindowClass ;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool UMAIsWindowModal( WindowRef inWindow )
|
|
||||||
{
|
|
||||||
WindowClass cl ;
|
|
||||||
|
|
||||||
GetWindowClass( inWindow , &cl ) ;
|
|
||||||
return cl < kFloatingWindowClass ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// others
|
// others
|
||||||
|
|
||||||
void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
|
void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
|
||||||
{
|
{
|
||||||
|
#if 1 // TODO REMOVE
|
||||||
if ( inWindowRef )
|
if ( inWindowRef )
|
||||||
{
|
{
|
||||||
// bool isHighlighted = IsWindowHighlited( inWindowRef ) ;
|
// bool isHighlighted = IsWindowHighlited( inWindowRef ) ;
|
||||||
@@ -472,14 +381,6 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
|
|||||||
SetPort( port ) ;
|
SetPort( port ) ;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
|
|
||||||
{
|
|
||||||
#ifndef __LP64__
|
|
||||||
return ::DrawThemePlacard( inRect , inState ) ;
|
|
||||||
#else
|
|
||||||
return noErr;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,64 +404,6 @@ Rect * UMAGetControlBoundsInWindowCoords( ControlRef theControl, Rect *bounds )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __LP64__
|
|
||||||
|
|
||||||
wxMacPortStateHelper::wxMacPortStateHelper( GrafPtr newport )
|
|
||||||
{
|
|
||||||
m_clip = NULL ;
|
|
||||||
Setup( newport ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMacPortStateHelper::wxMacPortStateHelper()
|
|
||||||
{
|
|
||||||
m_clip = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxMacPortStateHelper::Setup( GrafPtr newport )
|
|
||||||
{
|
|
||||||
GetPort( &m_oldPort ) ;
|
|
||||||
SetPort( newport ) ;
|
|
||||||
SetOrigin(0, 0);
|
|
||||||
|
|
||||||
wxASSERT_MSG( m_clip == NULL , wxT("Cannot call setup twice") ) ;
|
|
||||||
m_clip = NewRgn() ;
|
|
||||||
GetClip( m_clip );
|
|
||||||
m_textFont = GetPortTextFont( (CGrafPtr) newport );
|
|
||||||
m_textSize = GetPortTextSize( (CGrafPtr) newport );
|
|
||||||
m_textStyle = GetPortTextFace( (CGrafPtr) newport );
|
|
||||||
m_textMode = GetPortTextMode( (CGrafPtr) newport );
|
|
||||||
GetThemeDrawingState( &m_drawingState ) ;
|
|
||||||
m_currentPort = newport ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxMacPortStateHelper::Clear()
|
|
||||||
{
|
|
||||||
if ( m_clip )
|
|
||||||
{
|
|
||||||
DisposeRgn( m_clip ) ;
|
|
||||||
DisposeThemeDrawingState( m_drawingState ) ;
|
|
||||||
m_clip = NULL ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMacPortStateHelper::~wxMacPortStateHelper()
|
|
||||||
{
|
|
||||||
if ( m_clip )
|
|
||||||
{
|
|
||||||
SetPort( m_currentPort ) ;
|
|
||||||
SetClip( m_clip ) ;
|
|
||||||
DisposeRgn( m_clip ) ;
|
|
||||||
TextFont( m_textFont );
|
|
||||||
TextSize( m_textSize );
|
|
||||||
TextFace( m_textStyle );
|
|
||||||
TextMode( m_textMode );
|
|
||||||
SetThemeDrawingState( m_drawingState , true ) ;
|
|
||||||
SetPort( m_oldPort ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
size_t UMAPutBytesCFRefCallback( void *info, const void *bytes, size_t count )
|
size_t UMAPutBytesCFRefCallback( void *info, const void *bytes, size_t count )
|
||||||
{
|
{
|
||||||
CFMutableDataRef data = (CFMutableDataRef) info;
|
CFMutableDataRef data = (CFMutableDataRef) info;
|
||||||
@@ -601,19 +444,3 @@ CGDataConsumerRef UMACGDataConsumerCreateWithCFData( CFMutableDataRef data )
|
|||||||
return CGDataConsumerCreateWithCFData( data );
|
return CGDataConsumerCreateWithCFData( data );
|
||||||
}
|
}
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#if wxUSE_BASE
|
|
||||||
|
|
||||||
static bool sUMASystemInitialized = false ;
|
|
||||||
|
|
||||||
bool UMASystemIsInitialized()
|
|
||||||
{
|
|
||||||
return sUMASystemInitialized ;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UMASetSystemIsInitialized(bool val)
|
|
||||||
{
|
|
||||||
sUMASystemInitialized = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
|
||||||
|
@@ -194,6 +194,8 @@ void wxGetMousePosition( int* x, int* y )
|
|||||||
GetGlobalMouse(&pt);
|
GetGlobalMouse(&pt);
|
||||||
*x = pt.h;
|
*x = pt.h;
|
||||||
*y = pt.v;
|
*y = pt.v;
|
||||||
|
#else
|
||||||
|
// TODO
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -218,7 +220,7 @@ int wxDisplayDepth()
|
|||||||
|
|
||||||
return theDepth;
|
return theDepth;
|
||||||
#else
|
#else
|
||||||
return 32;
|
return 32; // TODO
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -379,48 +381,34 @@ wxString wxMacMakeStringFromPascal( ConstStringPtr from )
|
|||||||
// Common Event Support
|
// Common Event Support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern ProcessSerialNumber gAppProcess;
|
|
||||||
|
|
||||||
void wxMacWakeUp()
|
void wxMacWakeUp()
|
||||||
{
|
{
|
||||||
ProcessSerialNumber psn;
|
OSStatus err = noErr;
|
||||||
Boolean isSame;
|
|
||||||
psn.highLongOfPSN = 0;
|
|
||||||
psn.lowLongOfPSN = kCurrentProcess;
|
|
||||||
SameProcess( &gAppProcess , &psn , &isSame );
|
|
||||||
if ( isSame )
|
|
||||||
{
|
|
||||||
OSStatus err = noErr;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// lead sometimes to race conditions, although all calls used should be thread safe ...
|
// lead sometimes to race conditions, although all calls used should be thread safe ...
|
||||||
static wxMacCarbonEvent s_wakeupEvent;
|
static wxMacCarbonEvent s_wakeupEvent;
|
||||||
if ( !s_wakeupEvent.IsValid() )
|
if ( !s_wakeupEvent.IsValid() )
|
||||||
{
|
|
||||||
err = s_wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
|
|
||||||
kEventAttributeNone );
|
|
||||||
}
|
|
||||||
if ( err == noErr )
|
|
||||||
{
|
|
||||||
|
|
||||||
if ( IsEventInQueue( GetMainEventQueue() , s_wakeupEvent ) )
|
|
||||||
return;
|
|
||||||
s_wakeupEvent.SetCurrentTime();
|
|
||||||
err = PostEventToQueue(GetMainEventQueue(), s_wakeupEvent,
|
|
||||||
kEventPriorityHigh );
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
wxMacCarbonEvent wakeupEvent;
|
|
||||||
wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
|
|
||||||
kEventAttributeNone );
|
|
||||||
err = PostEventToQueue(GetMainEventQueue(), wakeupEvent,
|
|
||||||
kEventPriorityHigh );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
WakeUpProcess( &gAppProcess );
|
err = s_wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
|
||||||
|
kEventAttributeNone );
|
||||||
}
|
}
|
||||||
|
if ( err == noErr )
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( IsEventInQueue( GetMainEventQueue() , s_wakeupEvent ) )
|
||||||
|
return;
|
||||||
|
s_wakeupEvent.SetCurrentTime();
|
||||||
|
err = PostEventToQueue(GetMainEventQueue(), s_wakeupEvent,
|
||||||
|
kEventPriorityHigh );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
wxMacCarbonEvent wakeupEvent;
|
||||||
|
wakeupEvent.Create( 'WXMC', 'WXMC', GetCurrentEventTime(),
|
||||||
|
kEventAttributeNone );
|
||||||
|
err = PostEventToQueue(GetMainEventQueue(), wakeupEvent,
|
||||||
|
kEventPriorityHigh );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
#endif // wxUSE_BASE
|
||||||
@@ -854,7 +842,7 @@ void wxMacControl::SetLabel( const wxString &title )
|
|||||||
else
|
else
|
||||||
encoding = wxFont::GetDefaultEncoding();
|
encoding = wxFont::GetDefaultEncoding();
|
||||||
|
|
||||||
UMASetControlTitle( m_controlRef , title , encoding );
|
SetControlTitleWithCFString( m_controlRef , wxMacCFStringHolder( title , encoding ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacControl::GetFeatures( UInt32 * features )
|
void wxMacControl::GetFeatures( UInt32 * features )
|
||||||
@@ -1972,3 +1960,7 @@ void wxMacLocalToGlobal( WindowRef window , Point*pt )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#if wxUSE_BASE
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user