git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16535
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// __wxinitialize in Mach-O shared libraries
wxStAppResource::OpenSharedLibraryResource(NULL);
#endif
// __wxinitialize in Mach-O shared libraries
wxStAppResource::OpenSharedLibraryResource(NULL);
#endif
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
NewAEEventHandlerUPP(AEHandleODoc) ,
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
NewAEEventHandlerUPP(AEHandleODoc) ,
s_macCursorRgn = ::NewRgn() ;
wxBuffer = new char[BUFSIZ + 512];
s_macCursorRgn = ::NewRgn() ;
wxBuffer = new char[BUFSIZ + 512];
wxClassInfo::InitializeClasses();
#if wxUSE_RESOURCES
wxClassInfo::InitializeClasses();
#if wxUSE_RESOURCES
#if wxUSE_THREADS
wxPendingEventsLocker = new wxCriticalSection;
#endif
#if wxUSE_THREADS
wxPendingEventsLocker = new wxCriticalSection;
#endif
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
delete wxWinMacControlList ;
}
delete wxPendingEvents;
delete wxWinMacControlList ;
}
delete wxPendingEvents;
#if wxUSE_THREADS
delete wxPendingEventsLocker;
// If we don't do the following, we get an apparent memory leak.
#if wxUSE_THREADS
delete wxPendingEventsLocker;
// If we don't do the following, we get an apparent memory leak.
// __wxterminate in Mach-O shared libraries
wxStAppResource::CloseSharedLibraryResource();
#endif
// __wxterminate in Mach-O shared libraries
wxStAppResource::CloseSharedLibraryResource();
#endif
UMACleanupToolbox() ;
if (s_macCursorRgn) {
::DisposeRgn((RgnHandle)s_macCursorRgn);
}
UMACleanupToolbox() ;
if (s_macCursorRgn) {
::DisposeRgn((RgnHandle)s_macCursorRgn);
}
#if 0
TerminateAE() ;
#endif
#if 0
TerminateAE() ;
#endif
if ( initBlock != NULL ) {
const CFragInitBlock *theInitBlock = (const CFragInitBlock *)initBlock;
FSSpec *fileSpec = NULL;
if ( initBlock != NULL ) {
const CFragInitBlock *theInitBlock = (const CFragInitBlock *)initBlock;
FSSpec *fileSpec = NULL;
if (theInitBlock->fragLocator.where == kDataForkCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.onDisk.fileSpec;
}
else if (theInitBlock->fragLocator.where == kResourceCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.inSegs.fileSpec;
}
if (theInitBlock->fragLocator.where == kDataForkCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.onDisk.fileSpec;
}
else if (theInitBlock->fragLocator.where == kResourceCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.inSegs.fileSpec;
}
if (fileSpec != NULL) {
gSharedLibraryResource = FSpOpenResFile(fileSpec, fsRdPerm);
}
if (fileSpec != NULL) {
gSharedLibraryResource = FSpOpenResFile(fileSpec, fsRdPerm);
}
NSSymbol theSymbol;
NSModule theModule;
const char *theLibPath;
NSSymbol theSymbol;
NSModule theModule;
const char *theLibPath;
gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWindows"));
if (gSharedLibraryBundle != NULL) {
// wxWindows has been bundled into a framework
// load the framework resources
gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWindows"));
if (gSharedLibraryBundle != NULL) {
// wxWindows has been bundled into a framework
// load the framework resources
gSharedLibraryResource = CFBundleOpenBundleResourceMap(gSharedLibraryBundle);
}
else {
gSharedLibraryResource = CFBundleOpenBundleResourceMap(gSharedLibraryBundle);
}
else {
char *theExt;
FSRef theResRef;
OSErr theErr = noErr;
char *theExt;
FSRef theResRef;
OSErr theErr = noErr;
// get the library path
theSymbol = NSLookupAndBindSymbol("_gSharedLibraryResource");
theModule = NSModuleForSymbol(theSymbol);
// get the library path
theSymbol = NSLookupAndBindSymbol("_gSharedLibraryResource");
theModule = NSModuleForSymbol(theSymbol);
theExt = strstr(theName, ".dylib");
// overwrite extension with ".rsrc"
strcpy(theExt, ".rsrc");
theExt = strstr(theName, ".dylib");
// overwrite extension with ".rsrc"
strcpy(theExt, ".rsrc");
wxLogDebug( theResPath );
theErr = FSPathMakeRef((UInt8 *) theResPath, &theResRef, false);
wxLogDebug( theResPath );
theErr = FSPathMakeRef((UInt8 *) theResPath, &theResRef, false);
// try in current directory (using name only)
theErr = FSPathMakeRef((UInt8 *) theName, &theResRef, false);
}
// try in current directory (using name only)
theErr = FSPathMakeRef((UInt8 *) theName, &theResRef, false);
}
// free duplicated resource file path
free(theResPath);
// free duplicated resource file path
free(theResPath);
CloseResFile(gSharedLibraryResource);
}
gSharedLibraryResource = kResFileNotOpened;
CloseResFile(gSharedLibraryResource);
}
gSharedLibraryResource = kResFileNotOpened;
#endif /* WXMAKINGDLL */
}
#endif /* WXMAKINGDLL */
}
if (argc > 1) {
char theArg[6] = "";
strncpy(theArg, argv[1], 5);
if (argc > 1) {
char theArg[6] = "";
strncpy(theArg, argv[1], 5);
if (strcmp(theArg, "-psn_") == 0) {
// assume the argument is always the only one and remove it
--argc;
}
if (strcmp(theArg, "-psn_") == 0) {
// assume the argument is always the only one and remove it
--argc;
}
#else
argc = 0 ; // currently we don't support files as parameters
#endif
#else
argc = 0 ; // currently we don't support files as parameters
#endif
case kEventClassKeyboard :
{
converted = true ;
case kEventClassKeyboard :
{
converted = true ;
- switch( GetEventKind(event) )
+ switch( GetEventKind(event) )
{
case kEventRawKeyDown :
rec->what = keyDown ;
{
case kEventRawKeyDown :
rec->what = keyDown ;
return converted ;
}
pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
return converted ;
}
pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
EventRecord rec ;
switch ( GetEventClass( event ) )
{
EventRecord rec ;
switch ( GetEventClass( event ) )
{
{
if ( ! wxAppBase::OnInit() )
return FALSE ;
{
if ( ! wxAppBase::OnInit() )
return FALSE ;
- static const EventTypeSpec eventList[] =
+ static const EventTypeSpec eventList[] =
{
{ kEventClassKeyboard, kEventRawKeyDown } ,
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
{ kEventClassKeyboard, kEventRawKeyUp } ,
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
{
{ kEventClassKeyboard, kEventRawKeyDown } ,
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
{ kEventClassKeyboard, kEventRawKeyUp } ,
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
{ kEventClassTextInput , kEventTextInputUnicodeForKeyEvent } ,
} ;
{ kEventClassTextInput , kEventTextInputUnicodeForKeyEvent } ,
} ;
InstallApplicationEventHandler(NewEventHandlerUPP(wxMacApplicationEventHandler)
InstallApplicationEventHandler(NewEventHandlerUPP(wxMacApplicationEventHandler)
- , WXSIZEOF(eventList), eventList, this, NULL);
+ , WXSIZEOF(eventList), eventList, this, NULL);
argv = NULL;
m_printMode = wxPRINT_WINDOWS;
argv = NULL;
m_printMode = wxPRINT_WINDOWS;
- m_exitOnFrameDelete = TRUE;
+ SetExitOnFrameDelete(TRUE);
s_lastMouseDown = 0 ;
if( convertClipboard )
{
MacConvertPrivateToPublicScrap() ;
}
s_lastMouseDown = 0 ;
if( convertClipboard )
{
MacConvertPrivateToPublicScrap() ;
}
::HideFloatingWindows() ;
}
::HideFloatingWindows() ;
}
{
MacConvertPublicToPrivateScrap() ;
}
{
MacConvertPublicToPrivateScrap() ;
}
::ShowFloatingWindows() ;
::ShowFloatingWindows() ;
// raise modal dialogs in case a non modal window was selected to activate the app
wxNode* node = wxModalDialogs.First();
// raise modal dialogs in case a non modal window was selected to activate the app
wxNode* node = wxModalDialogs.First();
{
wxDialog* dialog = (wxDialog *) node->Data();
dialog->Raise();
{
wxDialog* dialog = (wxDialog *) node->Data();
dialog->Raise();
event.m_timeStamp = ev->when;
wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus);
event.m_timeStamp = ev->when;
wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus);
if ( (ev->modifiers ^ s_lastModifiers ) & controlKey )
{
event.m_keyCode = WXK_CONTROL ;
if ( (ev->modifiers ^ s_lastModifiers ) & controlKey )
{
event.m_keyCode = WXK_CONTROL ;
- event.SetEventType( ( ev->modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & shiftKey )
{
event.m_keyCode = WXK_SHIFT ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & shiftKey )
{
event.m_keyCode = WXK_SHIFT ;
- event.SetEventType( ( ev->modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & optionKey )
{
event.m_keyCode = WXK_ALT ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & optionKey )
{
event.m_keyCode = WXK_ALT ;
- event.SetEventType( ( ev->modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
s_lastModifiers = ev->modifiers ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
s_lastModifiers = ev->modifiers ;
{
window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
windowPart = inContent ;
{
window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
windowPart = inContent ;
else
{
windowPart = ::FindWindow(ev->where, &window) ;
else
{
windowPart = ::FindWindow(ev->where, &window) ;
event.m_y = ev->where.v;
event.m_timeStamp = ev->when;
event.SetEventObject(this);
event.m_y = ev->where.v;
event.m_timeStamp = ev->when;
event.SetEventObject(this);
if ( wxWindow::s_lastMouseWindow )
{
wxMouseEvent eventleave(event);
eventleave.SetEventType( wxEVT_LEAVE_WINDOW );
wxWindow::s_lastMouseWindow->ScreenToClient( &eventleave.m_x, &eventleave.m_y );
eventleave.SetEventObject( wxWindow::s_lastMouseWindow ) ;
if ( wxWindow::s_lastMouseWindow )
{
wxMouseEvent eventleave(event);
eventleave.SetEventType( wxEVT_LEAVE_WINDOW );
wxWindow::s_lastMouseWindow->ScreenToClient( &eventleave.m_x, &eventleave.m_y );
eventleave.SetEventObject( wxWindow::s_lastMouseWindow ) ;
wxWindow::s_lastMouseWindow->GetEventHandler()->ProcessEvent(eventleave);
}
if ( currentMouseWindow )
wxWindow::s_lastMouseWindow->GetEventHandler()->ProcessEvent(eventleave);
}
if ( currentMouseWindow )
// __wxinitialize in Mach-O shared libraries
wxStAppResource::OpenSharedLibraryResource(NULL);
#endif
// __wxinitialize in Mach-O shared libraries
wxStAppResource::OpenSharedLibraryResource(NULL);
#endif
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
NewAEEventHandlerUPP(AEHandleODoc) ,
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments ,
NewAEEventHandlerUPP(AEHandleODoc) ,
s_macCursorRgn = ::NewRgn() ;
wxBuffer = new char[BUFSIZ + 512];
s_macCursorRgn = ::NewRgn() ;
wxBuffer = new char[BUFSIZ + 512];
wxClassInfo::InitializeClasses();
#if wxUSE_RESOURCES
wxClassInfo::InitializeClasses();
#if wxUSE_RESOURCES
#if wxUSE_THREADS
wxPendingEventsLocker = new wxCriticalSection;
#endif
#if wxUSE_THREADS
wxPendingEventsLocker = new wxCriticalSection;
#endif
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
delete wxWinMacControlList ;
}
delete wxPendingEvents;
delete wxWinMacControlList ;
}
delete wxPendingEvents;
#if wxUSE_THREADS
delete wxPendingEventsLocker;
// If we don't do the following, we get an apparent memory leak.
#if wxUSE_THREADS
delete wxPendingEventsLocker;
// If we don't do the following, we get an apparent memory leak.
// __wxterminate in Mach-O shared libraries
wxStAppResource::CloseSharedLibraryResource();
#endif
// __wxterminate in Mach-O shared libraries
wxStAppResource::CloseSharedLibraryResource();
#endif
UMACleanupToolbox() ;
if (s_macCursorRgn) {
::DisposeRgn((RgnHandle)s_macCursorRgn);
}
UMACleanupToolbox() ;
if (s_macCursorRgn) {
::DisposeRgn((RgnHandle)s_macCursorRgn);
}
#if 0
TerminateAE() ;
#endif
#if 0
TerminateAE() ;
#endif
if ( initBlock != NULL ) {
const CFragInitBlock *theInitBlock = (const CFragInitBlock *)initBlock;
FSSpec *fileSpec = NULL;
if ( initBlock != NULL ) {
const CFragInitBlock *theInitBlock = (const CFragInitBlock *)initBlock;
FSSpec *fileSpec = NULL;
if (theInitBlock->fragLocator.where == kDataForkCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.onDisk.fileSpec;
}
else if (theInitBlock->fragLocator.where == kResourceCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.inSegs.fileSpec;
}
if (theInitBlock->fragLocator.where == kDataForkCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.onDisk.fileSpec;
}
else if (theInitBlock->fragLocator.where == kResourceCFragLocator) {
fileSpec = theInitBlock->fragLocator.u.inSegs.fileSpec;
}
if (fileSpec != NULL) {
gSharedLibraryResource = FSpOpenResFile(fileSpec, fsRdPerm);
}
if (fileSpec != NULL) {
gSharedLibraryResource = FSpOpenResFile(fileSpec, fsRdPerm);
}
NSSymbol theSymbol;
NSModule theModule;
const char *theLibPath;
NSSymbol theSymbol;
NSModule theModule;
const char *theLibPath;
gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWindows"));
if (gSharedLibraryBundle != NULL) {
// wxWindows has been bundled into a framework
// load the framework resources
gSharedLibraryBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.wxwindows.wxWindows"));
if (gSharedLibraryBundle != NULL) {
// wxWindows has been bundled into a framework
// load the framework resources
gSharedLibraryResource = CFBundleOpenBundleResourceMap(gSharedLibraryBundle);
}
else {
gSharedLibraryResource = CFBundleOpenBundleResourceMap(gSharedLibraryBundle);
}
else {
char *theExt;
FSRef theResRef;
OSErr theErr = noErr;
char *theExt;
FSRef theResRef;
OSErr theErr = noErr;
// get the library path
theSymbol = NSLookupAndBindSymbol("_gSharedLibraryResource");
theModule = NSModuleForSymbol(theSymbol);
// get the library path
theSymbol = NSLookupAndBindSymbol("_gSharedLibraryResource");
theModule = NSModuleForSymbol(theSymbol);
theExt = strstr(theName, ".dylib");
// overwrite extension with ".rsrc"
strcpy(theExt, ".rsrc");
theExt = strstr(theName, ".dylib");
// overwrite extension with ".rsrc"
strcpy(theExt, ".rsrc");
wxLogDebug( theResPath );
theErr = FSPathMakeRef((UInt8 *) theResPath, &theResRef, false);
wxLogDebug( theResPath );
theErr = FSPathMakeRef((UInt8 *) theResPath, &theResRef, false);
// try in current directory (using name only)
theErr = FSPathMakeRef((UInt8 *) theName, &theResRef, false);
}
// try in current directory (using name only)
theErr = FSPathMakeRef((UInt8 *) theName, &theResRef, false);
}
// free duplicated resource file path
free(theResPath);
// free duplicated resource file path
free(theResPath);
CloseResFile(gSharedLibraryResource);
}
gSharedLibraryResource = kResFileNotOpened;
CloseResFile(gSharedLibraryResource);
}
gSharedLibraryResource = kResFileNotOpened;
#endif /* WXMAKINGDLL */
}
#endif /* WXMAKINGDLL */
}
if (argc > 1) {
char theArg[6] = "";
strncpy(theArg, argv[1], 5);
if (argc > 1) {
char theArg[6] = "";
strncpy(theArg, argv[1], 5);
if (strcmp(theArg, "-psn_") == 0) {
// assume the argument is always the only one and remove it
--argc;
}
if (strcmp(theArg, "-psn_") == 0) {
// assume the argument is always the only one and remove it
--argc;
}
#else
argc = 0 ; // currently we don't support files as parameters
#endif
#else
argc = 0 ; // currently we don't support files as parameters
#endif
case kEventClassKeyboard :
{
converted = true ;
case kEventClassKeyboard :
{
converted = true ;
- switch( GetEventKind(event) )
+ switch( GetEventKind(event) )
{
case kEventRawKeyDown :
rec->what = keyDown ;
{
case kEventRawKeyDown :
rec->what = keyDown ;
return converted ;
}
pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
return converted ;
}
pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
OSStatus result = eventNotHandledErr ;
EventRecord rec ;
switch ( GetEventClass( event ) )
{
EventRecord rec ;
switch ( GetEventClass( event ) )
{
{
if ( ! wxAppBase::OnInit() )
return FALSE ;
{
if ( ! wxAppBase::OnInit() )
return FALSE ;
- static const EventTypeSpec eventList[] =
+ static const EventTypeSpec eventList[] =
{
{ kEventClassKeyboard, kEventRawKeyDown } ,
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
{ kEventClassKeyboard, kEventRawKeyUp } ,
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
{
{ kEventClassKeyboard, kEventRawKeyDown } ,
{ kEventClassKeyboard, kEventRawKeyRepeat } ,
{ kEventClassKeyboard, kEventRawKeyUp } ,
{ kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
{ kEventClassTextInput , kEventTextInputUnicodeForKeyEvent } ,
} ;
{ kEventClassTextInput , kEventTextInputUnicodeForKeyEvent } ,
} ;
InstallApplicationEventHandler(NewEventHandlerUPP(wxMacApplicationEventHandler)
InstallApplicationEventHandler(NewEventHandlerUPP(wxMacApplicationEventHandler)
- , WXSIZEOF(eventList), eventList, this, NULL);
+ , WXSIZEOF(eventList), eventList, this, NULL);
argv = NULL;
m_printMode = wxPRINT_WINDOWS;
argv = NULL;
m_printMode = wxPRINT_WINDOWS;
- m_exitOnFrameDelete = TRUE;
+ SetExitOnFrameDelete(TRUE);
s_lastMouseDown = 0 ;
if( convertClipboard )
{
MacConvertPrivateToPublicScrap() ;
}
s_lastMouseDown = 0 ;
if( convertClipboard )
{
MacConvertPrivateToPublicScrap() ;
}
::HideFloatingWindows() ;
}
::HideFloatingWindows() ;
}
{
MacConvertPublicToPrivateScrap() ;
}
{
MacConvertPublicToPrivateScrap() ;
}
::ShowFloatingWindows() ;
::ShowFloatingWindows() ;
// raise modal dialogs in case a non modal window was selected to activate the app
wxNode* node = wxModalDialogs.First();
// raise modal dialogs in case a non modal window was selected to activate the app
wxNode* node = wxModalDialogs.First();
{
wxDialog* dialog = (wxDialog *) node->Data();
dialog->Raise();
{
wxDialog* dialog = (wxDialog *) node->Data();
dialog->Raise();
event.m_timeStamp = ev->when;
wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus);
event.m_timeStamp = ev->when;
wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus);
if ( (ev->modifiers ^ s_lastModifiers ) & controlKey )
{
event.m_keyCode = WXK_CONTROL ;
if ( (ev->modifiers ^ s_lastModifiers ) & controlKey )
{
event.m_keyCode = WXK_CONTROL ;
- event.SetEventType( ( ev->modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & shiftKey )
{
event.m_keyCode = WXK_SHIFT ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & shiftKey )
{
event.m_keyCode = WXK_SHIFT ;
- event.SetEventType( ( ev->modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & optionKey )
{
event.m_keyCode = WXK_ALT ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
if ( (ev->modifiers ^ s_lastModifiers ) & optionKey )
{
event.m_keyCode = WXK_ALT ;
- event.SetEventType( ( ev->modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+ event.SetEventType( ( ev->modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
s_lastModifiers = ev->modifiers ;
focus->GetEventHandler()->ProcessEvent( event ) ;
}
s_lastModifiers = ev->modifiers ;
{
window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
windowPart = inContent ;
{
window = (WindowRef) s_captureWindow->MacGetRootWindow() ;
windowPart = inContent ;
else
{
windowPart = ::FindWindow(ev->where, &window) ;
else
{
windowPart = ::FindWindow(ev->where, &window) ;
event.m_y = ev->where.v;
event.m_timeStamp = ev->when;
event.SetEventObject(this);
event.m_y = ev->where.v;
event.m_timeStamp = ev->when;
event.SetEventObject(this);
if ( wxWindow::s_lastMouseWindow )
{
wxMouseEvent eventleave(event);
eventleave.SetEventType( wxEVT_LEAVE_WINDOW );
wxWindow::s_lastMouseWindow->ScreenToClient( &eventleave.m_x, &eventleave.m_y );
eventleave.SetEventObject( wxWindow::s_lastMouseWindow ) ;
if ( wxWindow::s_lastMouseWindow )
{
wxMouseEvent eventleave(event);
eventleave.SetEventType( wxEVT_LEAVE_WINDOW );
wxWindow::s_lastMouseWindow->ScreenToClient( &eventleave.m_x, &eventleave.m_y );
eventleave.SetEventObject( wxWindow::s_lastMouseWindow ) ;
wxWindow::s_lastMouseWindow->GetEventHandler()->ProcessEvent(eventleave);
}
if ( currentMouseWindow )
wxWindow::s_lastMouseWindow->GetEventHandler()->ProcessEvent(eventleave);
}
if ( currentMouseWindow )