comparison R/cocoa/src/package.m @ 0:0cfcc391201f

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:26:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cfcc391201f
1 /** ===========================================================================
2 ** R-Package: cocoa
3 ** File: coca/src/package.m
4 ** Description: R package registry and initialization of NSAutoreleasePool
5 **
6 ** Copyright (C) 2009 Daniel Adler
7 **/
8 #include <Rinternals.h>
9 #include <R_ext/Rdynload.h>
10 #include <stdio.h>
11 #import <Foundation/NSAutoreleasePool.h>
12 #import <AppKit/NSApplication.h>
13 NSAutoreleasePool* pool;
14
15 void R_init_cocoa(DllInfo* info)
16 {
17 [[NSAutoreleasePool alloc] init];
18 NSApplicationLoad();
19 // [NSApplication sharedApplication];
20 // [NSApp run];
21 printf("init\n");
22
23 }
24
25 void R_unload_cocoa(DllInfo* info)
26 {
27 [pool drain];
28 }
29