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:
@@ -50,6 +50,10 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
|||||||
virtual bool OnInitGui();
|
virtual bool OnInitGui();
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
|
#ifdef __WXOSX_IPHONE__
|
||||||
|
virtual int OnRun();
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual bool ProcessIdle();
|
virtual bool ProcessIdle();
|
||||||
|
|
||||||
// implementation only
|
// implementation only
|
||||||
|
@@ -841,11 +841,13 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxOSX_USE_COCOA_OR_CARBON
|
||||||
bool wxApp::CallOnInit()
|
bool wxApp::CallOnInit()
|
||||||
{
|
{
|
||||||
wxMacAutoreleasePool autoreleasepool;
|
wxMacAutoreleasePool autoreleasepool;
|
||||||
return OnInit();
|
return OnInit();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
{
|
{
|
||||||
|
@@ -249,7 +249,7 @@ WX_UIFont wxFont::OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info)
|
|||||||
if ( traits & NSFontItalicTrait )
|
if ( traits & NSFontItalicTrait )
|
||||||
fontstyle = wxFONTSTYLE_ITALIC ;
|
fontstyle = wxFONTSTYLE_ITALIC ;
|
||||||
*/
|
*/
|
||||||
wxCFStringRef fontname( [uifont familyName] );
|
wxCFStringRef fontname( wxCFRetain([uifont familyName]) );
|
||||||
info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined,
|
info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined,
|
||||||
fontname.AsString(), wxFONTENCODING_DEFAULT);
|
fontname.AsString(), wxFONTENCODING_DEFAULT);
|
||||||
|
|
||||||
@@ -270,6 +270,17 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info)
|
|||||||
// NSImage Utils
|
// 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
|
#if wxOSX_USE_COCOA
|
||||||
|
|
||||||
// From "Cocoa Drawing Guide:Working with Images"
|
// From "Cocoa Drawing Guide:Working with Images"
|
||||||
|
Reference in New Issue
Block a user