summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3ac1094)
Patch from Mark Taylor.
Copyright 2007 Software 2000 Ltd.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48106
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
17 files changed:
#ifndef __WX_COCOA_NSTABLEDATASOURCE_H__
#define __WX_COCOA_NSTABLEDATASOURCE_H__
#ifndef __WX_COCOA_NSTABLEDATASOURCE_H__
#define __WX_COCOA_NSTABLEDATASOURCE_H__
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <Foundation/NSObject.h>
// ============================================================================
#import <Foundation/NSObject.h>
// ============================================================================
objectValueForTableColumn: (NSTableColumn *)tableColumn
row: (int)rowIndex;
@end // wxCocoaNSTableDataSource
objectValueForTableColumn: (NSTableColumn *)tableColumn
row: (int)rowIndex;
@end // wxCocoaNSTableDataSource
+WX_DECLARE_GET_OBJC_CLASS(wxCocoaNSTableDataSource,NSObject)
#endif // _WX_COCOA_NSTABLEDATASOURCE_H_
#endif // _WX_COCOA_NSTABLEDATASOURCE_H_
#ifndef __WX_COCOA_OBJC_NSMENU_H__
#define __WX_COCOA_OBJC_NSMENU_H__
#ifndef __WX_COCOA_OBJC_NSMENU_H__
#define __WX_COCOA_OBJC_NSMENU_H__
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <AppKit/NSMenu.h>
// ============================================================================
#import <AppKit/NSMenu.h>
// ============================================================================
- (void)dealloc;
@end // WXNSMenu
- (void)dealloc;
@end // WXNSMenu
+WX_DECLARE_GET_OBJC_CLASS(WXNSMenu,NSMenu)
#endif //ndef __WX_COCOA_OBJC_NSMENU_H__
#endif //ndef __WX_COCOA_OBJC_NSMENU_H__
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSMenu,NSMenu)
// ============================================================================
// @class wxNSMenuNotificationObserver
// ============================================================================
// @class wxNSMenuNotificationObserver
-struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[wxNSMenuNotificationObserver alloc] init];
-
- (void)menuDidAddItem: (NSNotification *)notification;
- (void)menuDidChangeItem: (NSNotification *)notification;
- (void)menuDidRemoveItem: (NSNotification *)notification;
- (void)menuDidSendAction: (NSNotification *)notification;
- (void)menuWillSendAction: (NSNotification *)notification;
@end // interface wxNSMenuNotificationObserver
- (void)menuDidAddItem: (NSNotification *)notification;
- (void)menuDidChangeItem: (NSNotification *)notification;
- (void)menuDidRemoveItem: (NSNotification *)notification;
- (void)menuDidSendAction: (NSNotification *)notification;
- (void)menuWillSendAction: (NSNotification *)notification;
@end // interface wxNSMenuNotificationObserver
+WX_DECLARE_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject)
@implementation wxNSMenuNotificationObserver : NSObject
@implementation wxNSMenuNotificationObserver : NSObject
}
@end // implementation wxNSMenuNotificationObserver
}
@end // implementation wxNSMenuNotificationObserver
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSMenuNotificationObserver,NSObject)
// ========================================================================
// wxCocoaNSMenu
// ========================================================================
WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSMenu)
// ========================================================================
// wxCocoaNSMenu
// ========================================================================
WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSMenu)
+struct objc_object *wxCocoaNSMenu::sm_cocoaObserver = [[WX_GET_OBJC_CLASS(wxNSMenuNotificationObserver) alloc] init];
+
void wxCocoaNSMenu::AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags)
{
if(cocoaNSMenu)
void wxCocoaNSMenu::AssociateNSMenu(WX_NSMenu cocoaNSMenu, unsigned int flags)
{
if(cocoaNSMenu)
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#include "wx/cocoa/NSScroller.h"
#import <AppKit/NSScroller.h>
#include "wx/cocoa/NSScroller.h"
#import <AppKit/NSScroller.h>
- (void)wxNSScrollerAction: (id)sender;
@end // wxNSScrollerTarget
- (void)wxNSScrollerAction: (id)sender;
@end // wxNSScrollerTarget
+WX_DECLARE_GET_OBJC_CLASS(wxNSScrollerTarget,NSObject)
@implementation wxNSScrollerTarget : NSObject
- (void)wxNSScrollerAction: (id)sender
@implementation wxNSScrollerTarget : NSObject
- (void)wxNSScrollerAction: (id)sender
}
@end // implementation wxNSScrollerTarget
}
@end // implementation wxNSScrollerTarget
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSScrollerTarget,NSObject)
// ============================================================================
// class wxCocoaNSScroller
// ============================================================================
// ============================================================================
// class wxCocoaNSScroller
// ============================================================================
-const wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSScroller::sm_cocoaTarget = [[wxNSScrollerTarget alloc] init];
+const wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSScroller::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSScrollerTarget) alloc] init];
void wxCocoaNSScroller::AssociateNSScroller(WX_NSScroller cocoaNSScroller)
{
void wxCocoaNSScroller::AssociateNSScroller(WX_NSScroller cocoaNSScroller)
{
#include "wx/cocoa/NSTabView.h"
#include "wx/cocoa/NSTabView.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#include <AppKit/NSTabView.h>
// ============================================================================
#include <AppKit/NSTabView.h>
// ============================================================================
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem;
- (BOOL)tabView:(NSTabView*)tabView shouldSelectTabViewItem:(NSTabViewItem*)tabViewItem;
@end // interface wxNSTabViewDelegate : NSObject
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem;
- (BOOL)tabView:(NSTabView*)tabView shouldSelectTabViewItem:(NSTabViewItem*)tabViewItem;
@end // interface wxNSTabViewDelegate : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxNSTabViewDelegate,NSObject)
@implementation wxNSTabViewDelegate : NSObject
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem
@implementation wxNSTabViewDelegate : NSObject
- (void)tabView:(NSTabView*)tabView didSelectTabViewItem:(NSTabViewItem*)tabViewItem
}
@end // implementation wxNSTabViewDelegate : NSObject
}
@end // implementation wxNSTabViewDelegate : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSTabViewDelegate,NSObject)
// ============================================================================
// class wxCocoaNSTabView
// ============================================================================
WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSTabView)
// ============================================================================
// class wxCocoaNSTabView
// ============================================================================
WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSTabView)
-wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSTabView::sm_cocoaDelegate = [[wxNSTabViewDelegate alloc] init];
+wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSTabView::sm_cocoaDelegate = [[WX_GET_OBJC_CLASS(wxNSTabViewDelegate) alloc] init];
void wxCocoaNSTabView::AssociateNSTabView(WX_NSTabView cocoaNSTabView)
{
void wxCocoaNSTabView::AssociateNSTabView(WX_NSTabView cocoaNSTabView)
{
}
@end // implementation wxCocoaNSTableDataSource
}
@end // implementation wxCocoaNSTableDataSource
+WX_IMPLEMENT_GET_OBJC_CLASS(wxCocoaNSTableDataSource,NSObject)
#include "wx/cocoa/NSWindow.h"
#include "wx/cocoa/NSWindow.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <Foundation/NSNotification.h>
#import <Foundation/NSString.h>
#include "wx/cocoa/objc/NSWindow.h"
#import <Foundation/NSNotification.h>
#import <Foundation/NSString.h>
#include "wx/cocoa/objc/NSWindow.h"
- (void)wxMenuItemAction: (NSMenuItem *)menuItem;
- (BOOL)validateMenuItem: (NSMenuItem *)menuItem;
@end //interface wxNSWindowDelegate
- (void)wxMenuItemAction: (NSMenuItem *)menuItem;
- (BOOL)validateMenuItem: (NSMenuItem *)menuItem;
@end //interface wxNSWindowDelegate
+WX_DECLARE_GET_OBJC_CLASS(wxNSWindowDelegate,NSObject)
@implementation wxNSWindowDelegate : NSObject
@implementation wxNSWindowDelegate : NSObject
}
@end //implementation wxNSWindowDelegate
}
@end //implementation wxNSWindowDelegate
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSWindowDelegate,NSObject)
// ============================================================================
// class wxCocoaNSWindow
// ============================================================================
// class wxCocoaNSWindow
wxCocoaNSWindow::wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw)
: m_wxTopLevelWindowCocoa(tlw)
{
wxCocoaNSWindow::wxCocoaNSWindow(wxTopLevelWindowCocoa *tlw)
: m_wxTopLevelWindowCocoa(tlw)
{
- m_cocoaDelegate = [[wxNSWindowDelegate alloc] init];
+ m_cocoaDelegate = [[WX_GET_OBJC_CLASS(wxNSWindowDelegate) alloc] init];
[m_cocoaDelegate setWxCocoaInterface: this];
}
[m_cocoaDelegate setWxCocoaInterface: this];
}
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#ifndef WX_PRECOMP
#include "wx/window.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/window.h"
#include "wx/log.h"
- (void)comboBoxWillDismiss:(NSNotification *)notification;
- (void)comboBoxWillPopUp:(NSNotification *)notification;
@end // wxPoserNSComboBox
- (void)comboBoxWillDismiss:(NSNotification *)notification;
- (void)comboBoxWillPopUp:(NSNotification *)notification;
@end // wxPoserNSComboBox
+WX_DECLARE_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox)
//WX_IMPLEMENT_POSER(wxPoserNSComboBox);
@implementation wxPoserNSComboBox : NSComboBox
//WX_IMPLEMENT_POSER(wxPoserNSComboBox);
@implementation wxPoserNSComboBox : NSComboBox
}
@end // implementation wxPoserNSComboBox
}
@end // implementation wxPoserNSComboBox
+WX_IMPLEMENT_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox)
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
return false;
m_cocoaNSView = NULL;
return false;
m_cocoaNSView = NULL;
- SetNSComboBox([[wxPoserNSComboBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
+ SetNSComboBox([[WX_GET_OBJC_CLASS(wxPoserNSComboBox) alloc] initWithFrame:MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
[GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
[GetNSControl() sizeToFit];
[m_cocoaNSView release];
[GetNSTextField() setStringValue:wxNSStringWithWxString(value.c_str())];
[GetNSControl() sizeToFit];
[GetNSTableView() setHeaderView: nil];
// Set up the data source
[GetNSTableView() setHeaderView: nil];
// Set up the data source
- m_cocoaDataSource = [[wxCocoaNSTableDataSource alloc] init];
+ m_cocoaDataSource = [[WX_GET_OBJC_CLASS(wxCocoaNSTableDataSource) alloc] init];
[GetNSTableView() setDataSource:m_cocoaDataSource];
// Add the single column
[GetNSTableView() setDataSource:m_cocoaDataSource];
// Add the single column
#include "wx/cocoa/mbarman.h"
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/mbarman.h"
#include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
#import <Foundation/NSString.h>
#import <Foundation/NSNotification.h>
#import <Foundation/NSString.h>
#import <Foundation/NSNotification.h>
- (void)windowWillClose: (NSNotification *)notification;
#endif // 0
@end // interface wxMenuBarManagerObserver : NSObject
- (void)windowWillClose: (NSNotification *)notification;
#endif // 0
@end // interface wxMenuBarManagerObserver : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject)
@implementation wxMenuBarManagerObserver : NSObject
- (id)init
@implementation wxMenuBarManagerObserver : NSObject
- (id)init
#endif // 0
@end // implementation wxMenuBarManagerObserver : NSObject
#endif // 0
@end // implementation wxMenuBarManagerObserver : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject)
// ============================================================================
// wxMenuBarManager
// ============================================================================
// wxMenuBarManager
wxMenuBarManager::wxMenuBarManager()
{
wxMenuBarManager::wxMenuBarManager()
{
- m_observer = [[wxMenuBarManagerObserver alloc]
+ m_observer = [[WX_GET_OBJC_CLASS(wxMenuBarManagerObserver) alloc]
initWithWxMenuBarManager:this];
[[NSNotificationCenter defaultCenter] addObserver:m_observer
selector:@selector(windowDidBecomeKey:)
initWithWxMenuBarManager:this];
[[NSNotificationCenter defaultCenter] addObserver:m_observer
selector:@selector(windowDidBecomeKey:)
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP
- (id)initWithWxMDIParentFrame: (wxMDIParentFrame *)mdiParent;
- (void)windowDidBecomeMain: (NSNotification *)notification;
@end // interface wxMDIParentFrameObserver : NSObject
- (id)initWithWxMDIParentFrame: (wxMDIParentFrame *)mdiParent;
- (void)windowDidBecomeMain: (NSNotification *)notification;
@end // interface wxMDIParentFrameObserver : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxMDIParentFrameObserver,NSObject)
@implementation wxMDIParentFrameObserver : NSObject
- (id)init
@implementation wxMDIParentFrameObserver : NSObject
- (id)init
}
@end // implementation wxMDIParentFrameObserver : NSObject
}
@end // implementation wxMDIParentFrameObserver : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxMDIParentFrameObserver,NSObject)
// ========================================================================
// wxMDIParentFrame
// ========================================================================
// wxMDIParentFrame
{
m_clientWindow = NULL;
m_currentChild = NULL;
{
m_clientWindow = NULL;
m_currentChild = NULL;
- m_observer = [[wxMDIParentFrameObserver alloc]
+ m_observer = [[WX_GET_OBJC_CLASS(wxMDIParentFrameObserver) alloc]
initWithWxMDIParentFrame:this];
[[NSNotificationCenter defaultCenter] addObserver:m_observer
selector:@selector(windowDidBecomeMain:)
initWithWxMDIParentFrame:this];
[[NSNotificationCenter defaultCenter] addObserver:m_observer
selector:@selector(windowDidBecomeMain:)
bool wxMenu::Create(const wxString& title, long style)
{
wxAutoNSAutoreleasePool pool;
bool wxMenu::Create(const wxString& title, long style)
{
wxAutoNSAutoreleasePool pool;
- m_cocoaNSMenu = [[WXNSMenu alloc] initWithTitle: wxNSStringWithWxString(title)];
+ m_cocoaNSMenu = [[WX_GET_OBJC_CLASS(WXNSMenu) alloc] initWithTitle: wxNSStringWithWxString(title)];
AssociateNSMenu(m_cocoaNSMenu);
return true;
}
AssociateNSMenu(m_cocoaNSMenu);
return true;
}
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#ifndef WX_PRECOMP
#include "wx/menu.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/menu.h"
#include "wx/utils.h"
- (void)wxMenuItemAction: (id)sender;
- (BOOL)validateMenuItem: (id)menuItem;
@end //interface wxNSMenuItemTarget
- (void)wxMenuItemAction: (id)sender;
- (BOOL)validateMenuItem: (id)menuItem;
@end //interface wxNSMenuItemTarget
+WX_DECLARE_GET_OBJC_CLASS(wxNSMenuItemTarget,NSObject)
@implementation wxNSMenuItemTarget : NSObject
@implementation wxNSMenuItemTarget : NSObject
}
@end //implementation wxNSMenuItemTarget
}
@end //implementation wxNSMenuItemTarget
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSMenuItemTarget,NSObject)
// ============================================================================
// wxMenuItemCocoa implementation
// ============================================================================
// wxMenuItemCocoa implementation
IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
wxMenuItemCocoaHash wxMenuItemCocoa::sm_cocoaHash;
IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
wxMenuItemCocoaHash wxMenuItemCocoa::sm_cocoaHash;
-wxObjcAutoRefFromAlloc<struct objc_object *> wxMenuItemCocoa::sm_cocoaTarget = [[wxNSMenuItemTarget alloc] init];
+wxObjcAutoRefFromAlloc<struct objc_object *> wxMenuItemCocoa::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSMenuItemTarget) alloc] init];
// ----------------------------------------------------------------------------
// wxMenuItemBase
// ----------------------------------------------------------------------------
// wxMenuItemBase
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/string.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
#import <AppKit/NSTabView.h>
#import <AppKit/NSTabViewItem.h>
#import <AppKit/NSTabView.h>
#import <AppKit/NSTabViewItem.h>
- (NSImage*)image;
- (void)setImage:(NSImage*)image;
@end // interface WXCTabViewImageItem : NSTabViewItem
- (NSImage*)image;
- (void)setImage:(NSImage*)image;
@end // interface WXCTabViewImageItem : NSTabViewItem
+WX_DECLARE_GET_OBJC_CLASS(WXCTabViewImageItem,NSTabViewItem)
@implementation WXCTabViewImageItem : NSTabViewItem
- (id)init
@implementation WXCTabViewImageItem : NSTabViewItem
- (id)init
}
@end // implementation WXCTabViewImageItem : NSTabViewItem
}
@end // implementation WXCTabViewImageItem : NSTabViewItem
+WX_IMPLEMENT_GET_OBJC_CLASS(WXCTabViewImageItem,NSTabViewItem)
// ========================================================================
// wxNotebookEvent
// ========================================================================
// wxNotebookEvent
{
wxAutoNSAutoreleasePool pool;
m_pages.Insert(page,pos);
{
wxAutoNSAutoreleasePool pool;
m_pages.Insert(page,pos);
- NSTabViewItem *tvitem = [[WXCTabViewImageItem alloc] initWithIdentifier:nil];
+ NSTabViewItem *tvitem = [[WX_GET_OBJC_CLASS(WXCTabViewImageItem) alloc] initWithIdentifier:nil];
[tvitem setLabel: wxNSStringWithWxString(title)];
const wxBitmap *bmp = (imageId!=-1)?m_imageList->GetBitmapPtr(imageId):NULL;
if(bmp)
[tvitem setLabel: wxNSStringWithWxString(title)];
const wxBitmap *bmp = (imageId!=-1)?m_imageList->GetBitmapPtr(imageId):NULL;
if(bmp)
#include "wx/cocoa/string.h"
#include "wx/cocoa/log.h"
#include "wx/cocoa/string.h"
#include "wx/cocoa/log.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <AppKit/NSSound.h>
#import <Foundation/NSData.h>
#import <AppKit/NSSound.h>
#import <Foundation/NSData.h>
// Delegate methods
- (void)sound:(NSSound *)theSound didFinishPlaying:(BOOL)finishedPlaying;
@end // interface wxNSSoundDelegate : NSObject
// Delegate methods
- (void)sound:(NSSound *)theSound didFinishPlaying:(BOOL)finishedPlaying;
@end // interface wxNSSoundDelegate : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxNSSoundDelegate,NSObject)
@implementation wxNSSoundDelegate : NSObject
@implementation wxNSSoundDelegate : NSObject
}
@end // wxNSSoundDelegate
}
@end // wxNSSoundDelegate
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSSoundDelegate,NSObject)
-const wxObjcAutoRefFromAlloc<struct objc_object*> wxSound::sm_cocoaDelegate = [[wxNSSoundDelegate alloc] init];
+const wxObjcAutoRefFromAlloc<struct objc_object*> wxSound::sm_cocoaDelegate = [[WX_GET_OBJC_CLASS(wxNSSoundDelegate) alloc] init];
// ------------------------------------------------------------------
// wxSound
// ------------------------------------------------------------------
// wxSound
#include "wx/cocoa/private/timer.h"
#include "wx/cocoa/autorelease.h"
#include "wx/cocoa/private/timer.h"
#include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <Foundation/NSTimer.h>
// ========================================================================
#import <Foundation/NSTimer.h>
// ========================================================================
- (wxCocoaTimerImpl*)timer;
- (void)onNotify:(NSTimer *)theTimer;
@end // interface wxNSTimerData : NSObject
- (wxCocoaTimerImpl*)timer;
- (void)onNotify:(NSTimer *)theTimer;
@end // interface wxNSTimerData : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxNSTimerData,NSObject)
@implementation wxNSTimerData : NSObject
- (id)init
@implementation wxNSTimerData : NSObject
- (id)init
m_timer->Notify();
}
@end
m_timer->Notify();
}
@end
+WX_IMPLEMENT_GET_OBJC_CLASS(wxNSTimerData,NSObject)
// ----------------------------------------------------------------------------
// wxCocoaTimerImpl
// ----------------------------------------------------------------------------
// wxCocoaTimerImpl
wxAutoNSAutoreleasePool thePool;
wxAutoNSAutoreleasePool thePool;
- wxNSTimerData *timerData = [[wxNSTimerData alloc] initWithWxTimer:this];
+ wxNSTimerData *timerData = [[WX_GET_OBJC_CLASS(wxNSTimerData) alloc] initWithWxTimer:this];
m_cocoaNSTimer = [[NSTimer
scheduledTimerWithTimeInterval: millisecs / 1000.0 //seconds
target: timerData
m_cocoaNSTimer = [[NSTimer
scheduledTimerWithTimeInterval: millisecs / 1000.0 //seconds
target: timerData
#include "wx/cocoa/string.h"
#include "wx/cocoa/string.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
#import <Foundation/Foundation.h>
#import <AppKit/NSWorkspace.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSWorkspace.h>
-(id)init:(void*)handle processIdentifier:(long)pid;
- (void)termHandler:(NSNotification *)aNotification;
@end
-(id)init:(void*)handle processIdentifier:(long)pid;
- (void)termHandler:(NSNotification *)aNotification;
@end
+WX_DECLARE_GET_OBJC_CLASS(wxTaskHandler,NSObject)
@implementation wxTaskHandler : NSObject
@implementation wxTaskHandler : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxTaskHandler,NSObject)
long wxExecute(const wxString& command,
int sync,
long wxExecute(const wxString& command,
int sync,
if(sync & wxEXEC_ASYNC)
{
if(sync & wxEXEC_ASYNC)
{
- [[wxTaskHandler alloc]init:handle
+ [[WX_GET_OBJC_CLASS(wxTaskHandler) alloc]init:handle
processIdentifier:[theTask processIdentifier]];
return 0;
processIdentifier:[theTask processIdentifier]];
return 0;