cocoa bridge utils
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
33
src/mac/carbon/utils.mm
Normal file
33
src/mac/carbon/utils.mm
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: src/mac/carbon/utils.mm
|
||||||
|
// Purpose: various cocoa mixin utility functions
|
||||||
|
// Author: Stefan Csomor
|
||||||
|
// Modified by:
|
||||||
|
// Created: 1998-01-01
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Stefan Csomor
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
#include "wx/mac/private.h"
|
||||||
|
|
||||||
|
bool wxMacInitCocoa()
|
||||||
|
{
|
||||||
|
bool cocoaLoaded = NSApplicationLoad();
|
||||||
|
wxASSERT_MSG(cocoaLoaded,wxT("Couldn't load Cocoa in Carbon Environment")) ;
|
||||||
|
return cocoaLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxMacAutoreleasePool::wxMacAutoreleasePool()
|
||||||
|
{
|
||||||
|
m_pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
|
wxMacAutoreleasePool::~wxMacAutoreleasePool()
|
||||||
|
{
|
||||||
|
[m_pool release];
|
||||||
|
}
|
Reference in New Issue
Block a user