X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc96f525259a67031d16254d4fed87087ccfb6a8..3d777efedc1e05bd6c2a7c34a00a65895b62bb13:/src/osx/iphone/utils.mm diff --git a/src/osx/iphone/utils.mm b/src/osx/iphone/utils.mm index 55d5527c6a..633c7b72ac 100644 --- a/src/osx/iphone/utils.mm +++ b/src/osx/iphone/utils.mm @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/osx/cocoa/utils.mm +// Name: src/osx/iphone/utils.mm // Purpose: various cocoa utility functions // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utils.mm 48805 2007-09-19 14:52:25Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,14 +36,7 @@ #include -#if wxUSE_BASE - -// Emit a beeeeeep -void wxBell() -{ - // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually - AudioServicesPlayAlertSound(0x00001000 ); -} +#if 1 // wxUSE_BASE // ---------------------------------------------------------------------------- // 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 ); @@ -336,4 +348,4 @@ wxString wxGetOsDescription() } -#endif // wxOSX_USE_IPHONE \ No newline at end of file +#endif // wxOSX_USE_IPHONE