* -------------------------------------------------------------------------
*/
+#include "wx/wxprec.h"
+
#include "wx/wx.h"
#include "wx/mac/private.h"
typedef struct wxMacNotificationEvents wxMacNotificationEvents ;
static wxMacNotificationEvents gMacNotificationEvents ;
-static ProcessSerialNumber gAppProcess ;
-
-void wxMacWakeUp()
-{
- ProcessSerialNumber psn ;
- Boolean isSame ;
- psn.highLongOfPSN = 0 ;
- psn.lowLongOfPSN = kCurrentProcess ;
- SameProcess( &gAppProcess , &psn , &isSame ) ;
- if ( isSame )
- {
-#if TARGET_CARBON
- EventRef dummyEvent ;
- OSStatus err = MacCreateEvent(nil, 'WXMC', 'WXMC', GetCurrentEventTime(),
- kEventAttributeNone, &dummyEvent);
- if (err == noErr)
- {
- err = PostEventToQueue(GetMainEventQueue(), dummyEvent,
- kEventPriorityHigh);
- }
-#else
- PostEvent( nullEvent , 0 ) ;
-#endif
- }
- else
- {
- WakeUpProcess( &gAppProcess ) ;
- }
-}
+ProcessSerialNumber gAppProcess ;
void wxMacCreateNotifierTable()
{
for ( int i = 0 ; i < kMaxEvents ; ++i )
{
gMacNotificationEvents.proc[i] = NULL ;
- gMacNotificationEvents.events[i] = NULL ;
+ gMacNotificationEvents.events[i] = 0 ;
gMacNotificationEvents.data[i] = NULL ;
}
}
wxMacNotificationProcPtr handler = gMacNotificationEvents.proc[index] ;
gMacNotificationEvents.data[index] = NULL ;
- gMacNotificationEvents.events[index] = NULL ;
+ gMacNotificationEvents.events[index] = 0 ;
gMacNotificationEvents.proc[index] = NULL ;
if ( handler )