]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/iphone/utils.mm
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / src / osx / iphone / utils.mm
index e1e80ad5eb2a04b5bdd5a6514cc30917228fd7da..633c7b72ac21b082ff0b976098a30855cd90925a 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if 1 // wxUSE_BASE
 
-// Emit a beeeeeep
-void wxBell()
-{
-    // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
-    AudioServicesPlayAlertSound(0x00001000 );
-}
-
 // ----------------------------------------------------------------------------
 // Common Event Support
 // ----------------------------------------------------------------------------
@@ -57,13 +49,21 @@ void wxBell()
 
 @implementation wxAppDelegate
 
+- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+    wxUnusedVar(application);
+    wxUnusedVar(launchOptions);
+    wxTheApp->OSXOnWillFinishLaunching();
+    return YES;
+}
+
 - (void)applicationDidFinishLaunching:(UIApplication *)application {   
-       wxTheApp->OnInit();
+    wxTheApp->OSXOnDidFinishLaunching();
 }
 
 - (void)applicationWillTerminate:(UIApplication *)application { 
-    wxCloseEvent event;
-    wxTheApp->OnEndSession(event);
+    wxUnusedVar(application);
+    wxTheApp->OSXOnWillTerminate();
 }
 
 - (void)dealloc {
@@ -91,6 +91,13 @@ void wxApp::DoCleanUp()
 
 #if wxUSE_GUI
 
+// Emit a beeeeeep
+void wxBell()
+{
+    // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually
+    AudioServicesPlayAlertSound(0x00001000 );
+}
+
 // ----------------------------------------------------------------------------
 // Launch default browser
 // ----------------------------------------------------------------------------
@@ -118,6 +125,11 @@ extern UIFont* CreateUIFont( const wxFont& font )
     return [UIFont fontWithName:wxCFStringRef(font.GetFaceName() ).AsNSString() size:font.GetPointSize()];
 }
 
+CFArrayRef CopyAvailableFontFamilyNames()
+{
+    return (CFArrayRef) [[UIFont familyNames] retain];
+}
+
 extern void DrawTextInContext( CGContextRef context, CGPoint where, UIFont *font, NSString* text )
 {
     bool contextChanged = ( UIGraphicsGetCurrentContext() != context );