// application (otherwise applications would need to handle it)
if ( argc > 1 )
{
- static const wxChar *ARG_PSN = _T("-psn_");
+ static const wxChar *ARG_PSN = wxT("-psn_");
if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 )
{
// remove this argument
event_posted_context.perform = macPostedEventCallback;
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
- // run loop takes ownership
- CFRelease(m_macEventPosted);
+ // run loop takes ownership
+ CFRelease(m_macEventPosted);
*/
return true;
}
+#if wxOSX_USE_COCOA_OR_CARBON
bool wxApp::CallOnInit()
{
wxMacAutoreleasePool autoreleasepool;
return OnInit();
}
+#endif
bool wxApp::OnInitGui()
{
return wxAppBase::ProcessIdle();
}
+#if wxOSX_USE_COCOA_OR_CARBON
+
+int wxApp::OnRun()
+{
+ wxMacAutoreleasePool pool;
+ return wxAppBase::OnRun();
+}
+
+#else
+
+// iPhone version in utils.mm
+
+#endif
+
#if wxOSX_USE_CARBON
bool wxApp::DoInitGui()
{
void wxApp::CleanUp()
{
+ wxMacAutoreleasePool autoreleasepool;
#if wxUSE_TOOLTIPS
wxToolTip::RemoveToolTips() ;
#endif
if (m_macEventPosted)
- {
- CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
- m_macEventPosted = NULL;
- }
+ {
+ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
+ m_macEventPosted = NULL;
+ }
DoCleanUp();
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
// and look at the character after
#ifdef __LP64__
- // TODO new implementation using TextInputSources
+ // TODO new implementation using TextInputSources
#else
UInt32 state = 0;
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);