build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -513,13 +513,13 @@ bool wxMediaBackendCommonBase::SendStopEvent()
|
|||||||
{
|
{
|
||||||
wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId());
|
wxMediaEvent theEvent(wxEVT_MEDIA_STOP, m_ctrl->GetId());
|
||||||
|
|
||||||
return !m_ctrl->ProcessEvent(theEvent) || theEvent.IsAllowed();
|
return !m_ctrl->GetEventHandler()->ProcessEvent(theEvent) || theEvent.IsAllowed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType)
|
void wxMediaBackendCommonBase::QueueEvent(wxEventType evtType)
|
||||||
{
|
{
|
||||||
wxMediaEvent theEvent(evtType, m_ctrl->GetId());
|
wxMediaEvent theEvent(evtType, m_ctrl->GetId());
|
||||||
m_ctrl->AddPendingEvent(theEvent);
|
m_ctrl->GetEventHandler()->AddPendingEvent(theEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMediaBackendCommonBase::QueuePlayEvent()
|
void wxMediaBackendCommonBase::QueuePlayEvent()
|
||||||
|
@@ -253,7 +253,7 @@ short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
|
|||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId);
|
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId);
|
||||||
if (!win->ProcessEvent(exitEvent))
|
if (!win->GetEventHandler()->ProcessEvent(exitEvent))
|
||||||
win->Close(true) ;
|
win->Close(true) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -56,7 +56,7 @@ void wxMacWakeUp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_BASE
|
#endif // wxUSE_BASE
|
||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
|
|
||||||
@interface wxNSAppController : NSObject
|
@interface wxNSAppController : NSObject
|
||||||
@@ -100,7 +100,7 @@ void wxMacWakeUp()
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Allowable return values are:
|
Allowable return values are:
|
||||||
NSTerminateNow - it is ok to proceed with termination
|
NSTerminateNow - it is ok to proceed with termination
|
||||||
NSTerminateCancel - the application should not be terminated
|
NSTerminateCancel - the application should not be terminated
|
||||||
@@ -113,7 +113,7 @@ void wxMacWakeUp()
|
|||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, wxApp::s_macExitMenuItemId);
|
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, wxApp::s_macExitMenuItemId);
|
||||||
if (!win->ProcessEvent(exitEvent))
|
if (!win->GetEventHandler()->ProcessEvent(exitEvent))
|
||||||
win->Close(true) ;
|
win->Close(true) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -146,7 +146,7 @@ bool wxApp::DoInitGui()
|
|||||||
{
|
{
|
||||||
wxNSAppController* controller = [[wxNSAppController alloc] init];
|
wxNSAppController* controller = [[wxNSAppController alloc] init];
|
||||||
[[NSApplication sharedApplication] setDelegate:controller];
|
[[NSApplication sharedApplication] setDelegate:controller];
|
||||||
|
|
||||||
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
|
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
|
||||||
[appleEventManager setEventHandler:controller andSelector:@selector(handleGetURLEvent:withReplyEvent:)
|
[appleEventManager setEventHandler:controller andSelector:@selector(handleGetURLEvent:withReplyEvent:)
|
||||||
forEventClass:kInternetEventClass andEventID:kAEGetURL];
|
forEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||||
@@ -171,7 +171,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
|||||||
*width = r.GetWidth();
|
*width = r.GetWidth();
|
||||||
if ( height )
|
if ( height )
|
||||||
*height = r.GetHeight();
|
*height = r.GetHeight();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGetMousePosition( int* x, int* y )
|
void wxGetMousePosition( int* x, int* y )
|
||||||
@@ -240,23 +240,23 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
|
|||||||
// call this method when a Blit is performed with it as a source.
|
// call this method when a Blit is performed with it as a source.
|
||||||
if (!m_window)
|
if (!m_window)
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
|
|
||||||
wxSize sz = m_window->GetSize();
|
wxSize sz = m_window->GetSize();
|
||||||
|
|
||||||
int left = subrect != NULL ? subrect->x : 0 ;
|
int left = subrect != NULL ? subrect->x : 0 ;
|
||||||
int top = subrect != NULL ? subrect->y : 0 ;
|
int top = subrect != NULL ? subrect->y : 0 ;
|
||||||
int width = subrect != NULL ? subrect->width : sz.x;
|
int width = subrect != NULL ? subrect->width : sz.x;
|
||||||
int height = subrect != NULL ? subrect->height : sz.y ;
|
int height = subrect != NULL ? subrect->height : sz.y ;
|
||||||
|
|
||||||
NSRect rect = NSMakeRect(left, top, width, height );
|
NSRect rect = NSMakeRect(left, top, width, height );
|
||||||
NSView* view = (NSView*) m_window->GetHandle();
|
NSView* view = (NSView*) m_window->GetHandle();
|
||||||
[view lockFocus];
|
[view lockFocus];
|
||||||
// we use this method as other methods force a repaint, and this method can be
|
// we use this method as other methods force a repaint, and this method can be
|
||||||
// called from OnPaint, even with the window's paint dc as source (see wxHTMLWindow)
|
// called from OnPaint, even with the window's paint dc as source (see wxHTMLWindow)
|
||||||
NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: [view bounds]] retain];
|
NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: [view bounds]] retain];
|
||||||
[view unlockFocus];
|
[view unlockFocus];
|
||||||
|
|
||||||
CGImageRef cgImageRef = (CGImageRef)[rep CGImage];
|
CGImageRef cgImageRef = (CGImageRef)[rep CGImage];
|
||||||
|
|
||||||
wxBitmap bitmap(CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
|
wxBitmap bitmap(CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
|
||||||
CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
|
CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
|
||||||
@@ -265,7 +265,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
|
|||||||
CGImageRelease(cgImageRef);
|
CGImageRelease(cgImageRef);
|
||||||
cgImageRef = NULL;
|
cgImageRef = NULL;
|
||||||
[rep release];
|
[rep release];
|
||||||
|
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user