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:
Stefan Csomor
2007-05-22 16:01:41 +00:00
parent 16ff3d55ea
commit 61b314d902

33
src/mac/carbon/utils.mm Normal file
View 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];
}