adapting init sequence for different osx platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d39292566b
commit
cf4ce62c26
@ -50,6 +50,10 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
||||
virtual bool OnInitGui();
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#ifdef __WXOSX_IPHONE__
|
||||
virtual int OnRun();
|
||||
#endif
|
||||
|
||||
virtual bool ProcessIdle();
|
||||
|
||||
// implementation only
|
||||
|
@ -841,11 +841,13 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
bool wxApp::CallOnInit()
|
||||
{
|
||||
wxMacAutoreleasePool autoreleasepool;
|
||||
return OnInit();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool wxApp::OnInitGui()
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ WX_UIFont wxFont::OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info)
|
||||
if ( traits & NSFontItalicTrait )
|
||||
fontstyle = wxFONTSTYLE_ITALIC ;
|
||||
*/
|
||||
wxCFStringRef fontname( [uifont familyName] );
|
||||
wxCFStringRef fontname( wxCFRetain([uifont familyName]) );
|
||||
info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined,
|
||||
fontname.AsString(), wxFONTENCODING_DEFAULT);
|
||||
|
||||
@ -270,6 +270,17 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info)
|
||||
// NSImage Utils
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
|
||||
WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image )
|
||||
{
|
||||
UIImage *newImage = [UIImage imageWithCGImage:image];
|
||||
[newImage autorelease];
|
||||
return( newImage );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
|
||||
// From "Cocoa Drawing Guide:Working with Images"
|
||||
|
Loading…
Reference in New Issue
Block a user