]> git.saurik.com Git - wxWidgets.git/commitdiff
moving wxMacWakeUp to utils, as macnotify will soon be removed
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 14 May 2004 09:19:09 +0000 (09:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 14 May 2004 09:19:09 +0000 (09:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/macnotfy.cpp
src/mac/carbon/utils.cpp

index 690f83b214d3199dc69c3a01961261251d0bd7ca..2962de20f55f1297ff97c7c32d7de37b674f78c8 100644 (file)
@@ -28,35 +28,7 @@ struct wxMacNotificationEvents
 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()
 {
index eff9beaca22fd41bd298cf8a51c78500f9c17a51..bdaab9b20ce362cb28190f17e6a4a6c14e6edc3d 100644 (file)
@@ -1224,6 +1224,40 @@ void wxMacConvertNewlines10To13( wxChar * data )
 }
 #endif
 
+// ----------------------------------------------------------------------------
+// Common Event Support
+// ----------------------------------------------------------------------------
+
+extern 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 ) ;
+    }
+}
+
 // ----------------------------------------------------------------------------
 // Carbon Event Support
 // ----------------------------------------------------------------------------