mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-27 06:04:07 +03:00
Initial commit with content
- embed libnvim in an XPC-service - send some inputs to neovim and log the UI callbacks
This commit is contained in:
parent
10eb204539
commit
b3b47668e9
180
.gitignore
vendored
Normal file
180
.gitignore
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
|
||||
|
||||
*.iml
|
||||
|
||||
## Directory-based project format:
|
||||
.idea/
|
||||
# if you remove the above rule, at least ignore the following:
|
||||
|
||||
# User-specific stuff:
|
||||
# .idea/workspace.xml
|
||||
# .idea/tasks.xml
|
||||
# .idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
# .idea/dataSources.ids
|
||||
# .idea/dataSources.xml
|
||||
# .idea/sqlDataSources.xml
|
||||
# .idea/dynamic.xml
|
||||
# .idea/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
# .idea/gradle.xml
|
||||
# .idea/libraries
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
# .idea/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
|
||||
|
||||
### Xcode template
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.xcuserstate
|
||||
|
||||
|
||||
### Objective-C template
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
||||
#
|
||||
Pods/
|
||||
|
||||
|
||||
### Swift template
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
|
||||
# CocoaPods
|
||||
#
|
||||
# We recommend against adding the Pods directory to your .gitignore. However
|
||||
# you should judge for yourself, the pros and cons are mentioned at:
|
||||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
|
||||
#
|
||||
# Pods/
|
||||
|
||||
# Carthage
|
||||
#
|
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies.
|
||||
# Carthage/Checkouts
|
||||
|
||||
Carthage/Build
|
||||
|
||||
|
||||
### Vim template
|
||||
[._]*.s[a-w][a-z]
|
||||
[._]s[a-w][a-z]
|
||||
*.un~
|
||||
Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
|
||||
### NetBeans template
|
||||
nbproject/
|
||||
nbproject/private/
|
||||
build/
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
nbactions.xml
|
||||
.nb-gradle/
|
||||
|
||||
### OSX template
|
||||
*.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "neovim"]
|
||||
path = neovim
|
||||
url = git@github.com:qvacua/neovim.git
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Tae Won Ha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
33
NeoVimXpc/Info.plist
Normal file
33
NeoVimXpc/Info.plist
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>NeoVimXpc</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Tae Won Ha. All rights reserved.</string>
|
||||
<key>XPCService</key>
|
||||
<dict>
|
||||
<key>ServiceType</key>
|
||||
<string>Application</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
14
NeoVimXpc/NeoVimXpc.h
Normal file
14
NeoVimXpc/NeoVimXpc.h
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol NeoVimXpc
|
||||
|
||||
- (void)upperCaseString:(NSString *)aString withReply:(void (^)(NSString *))reply;
|
||||
|
||||
- (void)doSth;
|
||||
|
||||
@end
|
13
NeoVimXpc/NeoVimXpcImpl.h
Normal file
13
NeoVimXpc/NeoVimXpcImpl.h
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NeoVimXpc.h"
|
||||
|
||||
@interface NeoVimXpcImpl : NSObject <NeoVimXpc>
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
@end
|
297
NeoVimXpc/NeoVimXpcImpl.m
Normal file
297
NeoVimXpc/NeoVimXpcImpl.m
Normal file
@ -0,0 +1,297 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#import "NeoVimXpcImpl.h"
|
||||
|
||||
/**
|
||||
* FileInfo and Boolean are #defined by Carbon and NeoVim: Since we don't need the Carbon versions of them, we rename
|
||||
* them.
|
||||
*/
|
||||
#define FileInfo CarbonFileInfo
|
||||
#define Boolean CarbonBoolean
|
||||
|
||||
#import <nvim/vim.h>
|
||||
#import <nvim/api/vim.h>
|
||||
#import <nvim/ui.h>
|
||||
#import <nvim/ui_bridge.h>
|
||||
#import <nvim/event/stream.h>
|
||||
#import <nvim/event/signal.h>
|
||||
|
||||
|
||||
// we declare nvim_main because it's not declared in any header files of neovim
|
||||
extern int nvim_main(int argc, char **argv);
|
||||
|
||||
static bool is_ui_launched = false;
|
||||
|
||||
static NSCondition *uiLaunchCondition;
|
||||
|
||||
typedef struct {
|
||||
UIBridgeData *bridge;
|
||||
Loop *loop;
|
||||
Stream read_stream;
|
||||
|
||||
bool stop;
|
||||
bool cont_received;
|
||||
|
||||
// dunno whether we need this: copied from tui.c
|
||||
SignalWatcher cont_handle;
|
||||
} OsxXpcUiData;
|
||||
|
||||
static void sigcont_cb(SignalWatcher *watcher, int signum, void *data) {
|
||||
((OsxXpcUiData *) data)->cont_received = true;
|
||||
}
|
||||
|
||||
static void osx_xpc_ui_scheduler(Event event, void *d) {
|
||||
UI *ui = d;
|
||||
OsxXpcUiData *data = ui->data;
|
||||
loop_schedule(data->loop, event);
|
||||
}
|
||||
|
||||
static void osx_xpc_ui_main(UIBridgeData *bridge, UI *ui) {
|
||||
Loop loop;
|
||||
loop_init(&loop, NULL);
|
||||
|
||||
OsxXpcUiData *data = xcalloc(1, sizeof(OsxXpcUiData));
|
||||
ui->data = data;
|
||||
data->bridge = bridge;
|
||||
data->loop = &loop;
|
||||
|
||||
signal_watcher_init(data->loop, &data->cont_handle, data);
|
||||
signal_watcher_start(&data->cont_handle, sigcont_cb, SIGCONT);
|
||||
|
||||
bridge->bridge.width = 10;
|
||||
bridge->bridge.height = 5;
|
||||
|
||||
data->stop = false;
|
||||
CONTINUE(bridge);
|
||||
|
||||
[uiLaunchCondition lock];
|
||||
is_ui_launched = true;
|
||||
[uiLaunchCondition signal];
|
||||
[uiLaunchCondition unlock];
|
||||
|
||||
while (!data->stop) {
|
||||
loop_poll_events(&loop, -1);
|
||||
}
|
||||
|
||||
ui_bridge_stopped(bridge);
|
||||
loop_close(&loop);
|
||||
|
||||
xfree(data);
|
||||
xfree(ui);
|
||||
}
|
||||
|
||||
// copied from tui.c
|
||||
static void suspend_event(void **argv) {
|
||||
UI *ui = argv[0];
|
||||
OsxXpcUiData *data = ui->data;
|
||||
data->cont_received = false;
|
||||
|
||||
kill(0, SIGTSTP);
|
||||
|
||||
while (!data->cont_received) {
|
||||
// poll the event loop until SIGCONT is received
|
||||
loop_poll_events(data->loop, -1);
|
||||
}
|
||||
|
||||
CONTINUE(data->bridge);
|
||||
}
|
||||
|
||||
static void xpc_ui_resize(UI *ui, int rows, int columns) {
|
||||
NSLog(@"resize: %d:%d", rows, columns);
|
||||
}
|
||||
|
||||
static void xpc_ui_clear(UI *ui) {
|
||||
NSLog(@"clear\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_eol_clear(UI *ui) {
|
||||
NSLog(@"eol_clear\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_cursor_goto(UI *ui, int row, int col) {
|
||||
NSLog(@"cursor goto: %d:%d", row, col);
|
||||
}
|
||||
|
||||
static void xpc_ui_update_menu(UI *ui) {
|
||||
NSLog(@"update_menu\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_busy_start(UI *ui) {
|
||||
NSLog(@"busy_start\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_busy_stop(UI *ui) {
|
||||
NSLog(@"busy_stop\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_mouse_on(UI *ui) {
|
||||
NSLog(@"mouse_on\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_mouse_off(UI *ui) {
|
||||
NSLog(@"mouse_off\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_mode_change(UI *ui, int mode) {
|
||||
NSLog(@"mode_change: %04x", mode);
|
||||
}
|
||||
|
||||
static void xpc_ui_set_scroll_region(UI *ui, int top, int bot, int left, int right) {
|
||||
NSLog(@"set_scroll_region: %d:%d:%d:%d", top, bot, left, right);
|
||||
}
|
||||
|
||||
static void xpc_ui_scroll(UI *ui, int count) {
|
||||
NSLog(@"scroll: %d", count);
|
||||
}
|
||||
|
||||
static void xpc_ui_highlight_set(UI *ui, HlAttrs attrs) {
|
||||
NSLog(@"highlight_set\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_put(UI *ui, uint8_t *str, size_t len) {
|
||||
NSLog(@"put: %@", [[NSString alloc] initWithBytes:str length:len encoding:NSUTF8StringEncoding]);
|
||||
}
|
||||
|
||||
static void xpc_ui_bell(UI *ui) {
|
||||
NSLog(@"bell\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_visual_bell(UI *ui) {
|
||||
NSLog(@"visual_bell\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_flush(UI *ui) {
|
||||
NSLog(@"flush\n");
|
||||
}
|
||||
|
||||
static void xpc_ui_update_fg(UI *ui, int fg) {
|
||||
NSLog(@"update_fg: %d", fg);
|
||||
}
|
||||
|
||||
static void xpc_ui_update_bg(UI *ui, int bg) {
|
||||
NSLog(@"update_bg: %d", bg);
|
||||
}
|
||||
|
||||
static void xpc_ui_update_sp(UI *ui, int sp) {
|
||||
NSLog(@"update_sp: %d", sp);
|
||||
}
|
||||
|
||||
static void xpc_ui_suspend(UI *ui) {
|
||||
NSLog(@"suspend\n");
|
||||
|
||||
OsxXpcUiData *data = ui->data;
|
||||
// copied from tui.c
|
||||
// kill(0, SIGTSTP) won't stop the UI thread, so we must poll for SIGCONT
|
||||
// before continuing. This is done in another callback to avoid
|
||||
// loop_poll_events recursion
|
||||
queue_put_event(data->loop->fast_events, event_create(1, suspend_event, 1, ui));
|
||||
}
|
||||
|
||||
static void xpc_ui_set_title(UI *ui, char *title) {
|
||||
NSLog(@"set_title: %s", title);
|
||||
}
|
||||
|
||||
static void xpc_ui_set_icon(UI *ui, char *icon) {
|
||||
NSLog(@"set_icon: %s", icon);
|
||||
}
|
||||
|
||||
static void xpc_ui_stop(UI *ui) {
|
||||
NSLog(@"stop\n");
|
||||
|
||||
OsxXpcUiData *data = (OsxXpcUiData *) ui->data;
|
||||
data->stop = true;
|
||||
}
|
||||
|
||||
void custom_ui_start(void) {
|
||||
UI *ui = xcalloc(1, sizeof(UI));
|
||||
|
||||
ui->rgb = true;
|
||||
ui->stop = xpc_ui_stop;
|
||||
ui->resize = xpc_ui_resize;
|
||||
ui->clear = xpc_ui_clear;
|
||||
ui->eol_clear = xpc_ui_eol_clear;
|
||||
ui->cursor_goto = xpc_ui_cursor_goto;
|
||||
ui->update_menu = xpc_ui_update_menu;
|
||||
ui->busy_start = xpc_ui_busy_start;
|
||||
ui->busy_stop = xpc_ui_busy_stop;
|
||||
ui->mouse_on = xpc_ui_mouse_on;
|
||||
ui->mouse_off = xpc_ui_mouse_off;
|
||||
ui->mode_change = xpc_ui_mode_change;
|
||||
ui->set_scroll_region = xpc_ui_set_scroll_region;
|
||||
ui->scroll = xpc_ui_scroll;
|
||||
ui->highlight_set = xpc_ui_highlight_set;
|
||||
ui->put = xpc_ui_put;
|
||||
ui->bell = xpc_ui_bell;
|
||||
ui->visual_bell = xpc_ui_visual_bell;
|
||||
ui->update_fg = xpc_ui_update_fg;
|
||||
ui->update_bg = xpc_ui_update_bg;
|
||||
ui->update_sp = xpc_ui_update_sp;
|
||||
ui->flush = xpc_ui_flush;
|
||||
ui->suspend = xpc_ui_suspend;
|
||||
ui->set_title = xpc_ui_set_title;
|
||||
ui->set_icon = xpc_ui_set_icon;
|
||||
|
||||
NSLog(@"attaching ui");
|
||||
ui_bridge_attach(ui, osx_xpc_ui_main, osx_xpc_ui_scheduler);
|
||||
}
|
||||
|
||||
@implementation NeoVimXpcImpl {
|
||||
NSThread *_neovimThread;
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self == nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
uiLaunchCondition = [NSCondition new];
|
||||
|
||||
// set $VIMRUNTIME to ${RESOURCE_PATH_OF_XPC_BUNDLE}/runtime
|
||||
NSString *runtimePath = [[NSBundle mainBundle].resourcePath stringByAppendingPathComponent:@"runtime"];
|
||||
setenv("VIMRUNTIME", runtimePath.fileSystemRepresentation, true);
|
||||
|
||||
_neovimThread = [[NSThread alloc] initWithTarget:self selector:@selector(runNeovim:) object:self];
|
||||
[_neovimThread start];
|
||||
|
||||
// return only when the ui is launched
|
||||
[uiLaunchCondition lock];
|
||||
while (!is_ui_launched) {
|
||||
[uiLaunchCondition wait];
|
||||
}
|
||||
[uiLaunchCondition unlock];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)runNeovim:(id)sender {
|
||||
char *argv[1];
|
||||
argv[0] = "nvim";
|
||||
|
||||
nvim_main(1, argv);
|
||||
}
|
||||
|
||||
- (void)doSth {
|
||||
NSString *str = @"i";
|
||||
NSLog(@"entering input");
|
||||
vim_input((String) {.data=(char *) str.UTF8String, .size=[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]});
|
||||
|
||||
str = @"test input";
|
||||
NSLog(@"entering some text");
|
||||
vim_input((String) {.data=(char *) str.UTF8String, .size=[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]});
|
||||
|
||||
unichar esc = 27; // = 001B
|
||||
str = [NSString stringWithCharacters:&esc length:1];
|
||||
NSLog(@"entering normal");
|
||||
vim_input((String) {.data=(char *) str.UTF8String, .size=[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding]});
|
||||
}
|
||||
|
||||
- (void)upperCaseString:(NSString *)aString withReply:(void (^)(NSString *))reply {
|
||||
NSString *response = [aString uppercaseString];
|
||||
reply(response);
|
||||
}
|
||||
|
||||
@end
|
2
NeoVimXpc/local.mk
Normal file
2
NeoVimXpc/local.mk
Normal file
@ -0,0 +1,2 @@
|
||||
DISABLE_TUI := DISABLE
|
||||
ENABLE_CUSTOM_UI := ENABLE
|
34
NeoVimXpc/main.m
Normal file
34
NeoVimXpc/main.m
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NeoVimXpcImpl.h"
|
||||
|
||||
@interface NVXpcDelegate : NSObject <NSXPCListenerDelegate>
|
||||
@end
|
||||
|
||||
@implementation NVXpcDelegate
|
||||
|
||||
- (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection {
|
||||
newConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(NeoVimXpc)];
|
||||
newConnection.exportedObject = [NeoVimXpcImpl new];
|
||||
[newConnection resume];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
NVXpcDelegate *delegate = [NVXpcDelegate new];
|
||||
|
||||
NSXPCListener *listener = [NSXPCListener serviceListener];
|
||||
listener.delegate = delegate;
|
||||
|
||||
// this method does not return
|
||||
[listener resume];
|
||||
|
||||
return 0;
|
||||
}
|
30
README.md
Normal file
30
README.md
Normal file
@ -0,0 +1,30 @@
|
||||
nvox
|
||||
====
|
||||
|
||||
## About
|
||||
|
||||
nvox is a *toy* project, meaning e.g. no tests whatsoever, for me to:
|
||||
|
||||
- play around with [NeoVim](https://github.com/neovim),
|
||||
- play around with the `XPC`-architecture and to find out whether this is a viable choice for an OSX-NeoVim-GUI-app and
|
||||
- play around with Swift.
|
||||
|
||||
It could very well be that nothing useful comes out of it.
|
||||
|
||||
## How to Build
|
||||
|
||||
```bash
|
||||
brew install gettext
|
||||
git submodule update --init
|
||||
cd neovim
|
||||
ln -s ../NeoVimXpc/local.mk .
|
||||
make libnvim # optional, the nvox target in Xcode also does this
|
||||
```
|
||||
|
||||
Then run the `nvox`-target in Xcode.
|
||||
|
||||
## Project Setup
|
||||
|
||||
* The library `libiconv` is linked by the linker flag `-liconv`. The version bundled with OSX will be linked.
|
||||
* The library `libintl` should be installed by `homebrew` and is statically linked by explicitly using the linker flag `/usr/local/opt/gettext/lib/libintl.a`.
|
||||
* Other libraries used by NeoVim, which are automatically built by building `libnvim`, are linked by adding them to the Xcode project.
|
1
neovim
Submodule
1
neovim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6f102bc95442255058cbcbb6e559f3587d5e69d1
|
@ -7,147 +7,268 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4B2A2BC81D021C860074CE9A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A2BC71D021C860074CE9A /* AppDelegate.swift */; };
|
||||
4B2A2BCA1D021C860074CE9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B2A2BC91D021C860074CE9A /* Assets.xcassets */; };
|
||||
4B2A2BCD1D021C860074CE9A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B2A2BCB1D021C860074CE9A /* MainMenu.xib */; };
|
||||
4B2A2BD81D021C860074CE9A /* nvoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A2BD71D021C860074CE9A /* nvoxTests.swift */; };
|
||||
4BEBA5091CFF374B00673FDF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBA5081CFF374B00673FDF /* AppDelegate.swift */; };
|
||||
4BEBA50B1CFF374B00673FDF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4BEBA50A1CFF374B00673FDF /* Assets.xcassets */; };
|
||||
4BEBA50E1CFF374B00673FDF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4BEBA50C1CFF374B00673FDF /* MainMenu.xib */; };
|
||||
4BEBA5191CFF374B00673FDF /* nvoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBA5181CFF374B00673FDF /* nvoxTests.swift */; };
|
||||
4BEBA52C1CFF3DFF00673FDF /* NeoVimXpcImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBA52B1CFF3DFF00673FDF /* NeoVimXpcImpl.m */; };
|
||||
4BEBA52E1CFF3DFF00673FDF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBA52D1CFF3DFF00673FDF /* main.m */; };
|
||||
4BEBA5321CFF3DFF00673FDF /* NeoVimXpc.xpc in Embed XPC Services */ = {isa = PBXBuildFile; fileRef = 4BEBA5271CFF3DFF00673FDF /* NeoVimXpc.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
4BEBA5391CFF5E5D00673FDF /* libnvim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA5381CFF5E5D00673FDF /* libnvim.a */; };
|
||||
4BEBA5431CFF5EA500673FDF /* libjemalloc_pic.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA53A1CFF5EA500673FDF /* libjemalloc_pic.a */; };
|
||||
4BEBA5441CFF5EA500673FDF /* libjemalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA53B1CFF5EA500673FDF /* libjemalloc.a */; };
|
||||
4BEBA5451CFF5EA500673FDF /* libluajit-5.1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA53C1CFF5EA500673FDF /* libluajit-5.1.a */; };
|
||||
4BEBA5461CFF5EA500673FDF /* libluv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA53D1CFF5EA500673FDF /* libluv.a */; };
|
||||
4BEBA5471CFF5EA500673FDF /* libmsgpack.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA53E1CFF5EA500673FDF /* libmsgpack.a */; };
|
||||
4BEBA54A1CFF5EA500673FDF /* libuv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA5411CFF5EA500673FDF /* libuv.a */; };
|
||||
4BEBA54B1CFF5EA500673FDF /* libvterm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BEBA5421CFF5EA500673FDF /* libvterm.a */; };
|
||||
4BEBA6631D00157A00673FDF /* runtime in Resources */ = {isa = PBXBuildFile; fileRef = 4BEBA6621D00157A00673FDF /* runtime */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4B2A2BD41D021C860074CE9A /* PBXContainerItemProxy */ = {
|
||||
4BEBA5151CFF374B00673FDF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4B2A2BBC1D021C860074CE9A /* Project object */;
|
||||
containerPortal = 4BEBA4FD1CFF374B00673FDF /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 4B2A2BC31D021C860074CE9A;
|
||||
remoteGlobalIDString = 4BEBA5041CFF374B00673FDF;
|
||||
remoteInfo = nvox;
|
||||
};
|
||||
4BEBA5301CFF3DFF00673FDF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4BEBA4FD1CFF374B00673FDF /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 4BEBA5261CFF3DFF00673FDF;
|
||||
remoteInfo = NeoVimXpc;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
4BEBA5361CFF3DFF00673FDF /* Embed XPC Services */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
4BEBA5321CFF3DFF00673FDF /* NeoVimXpc.xpc in Embed XPC Services */,
|
||||
);
|
||||
name = "Embed XPC Services";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4B2A2BC41D021C860074CE9A /* nvox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nvox.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4B2A2BC71D021C860074CE9A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
4B2A2BC91D021C860074CE9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
4B2A2BCC1D021C860074CE9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4B2A2BCE1D021C860074CE9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4B2A2BD31D021C860074CE9A /* nvoxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = nvoxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4B2A2BD71D021C860074CE9A /* nvoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nvoxTests.swift; sourceTree = "<group>"; };
|
||||
4B2A2BD91D021C860074CE9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4BEBA5051CFF374B00673FDF /* nvox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nvox.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BEBA5081CFF374B00673FDF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
4BEBA50A1CFF374B00673FDF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
4BEBA50D1CFF374B00673FDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4BEBA50F1CFF374B00673FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4BEBA5141CFF374B00673FDF /* nvoxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = nvoxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BEBA5181CFF374B00673FDF /* nvoxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nvoxTests.swift; sourceTree = "<group>"; };
|
||||
4BEBA51A1CFF374B00673FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4BEBA5271CFF3DFF00673FDF /* NeoVimXpc.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = NeoVimXpc.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BEBA5291CFF3DFF00673FDF /* NeoVimXpc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NeoVimXpc.h; sourceTree = "<group>"; };
|
||||
4BEBA52A1CFF3DFF00673FDF /* NeoVimXpcImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NeoVimXpcImpl.h; sourceTree = "<group>"; };
|
||||
4BEBA52B1CFF3DFF00673FDF /* NeoVimXpcImpl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NeoVimXpcImpl.m; sourceTree = "<group>"; };
|
||||
4BEBA52D1CFF3DFF00673FDF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
4BEBA52F1CFF3DFF00673FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4BEBA5381CFF5E5D00673FDF /* libnvim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libnvim.a; path = neovim/build/lib/libnvim.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA53A1CFF5EA500673FDF /* libjemalloc_pic.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjemalloc_pic.a; path = neovim/.deps/usr/lib/libjemalloc_pic.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA53B1CFF5EA500673FDF /* libjemalloc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjemalloc.a; path = neovim/.deps/usr/lib/libjemalloc.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA53C1CFF5EA500673FDF /* libluajit-5.1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libluajit-5.1.a"; path = "neovim/.deps/usr/lib/libluajit-5.1.a"; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA53D1CFF5EA500673FDF /* libluv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluv.a; path = neovim/.deps/usr/lib/libluv.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA53E1CFF5EA500673FDF /* libmsgpack.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsgpack.a; path = neovim/.deps/usr/lib/libmsgpack.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA5411CFF5EA500673FDF /* libuv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuv.a; path = neovim/.deps/usr/lib/libuv.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA5421CFF5EA500673FDF /* libvterm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvterm.a; path = neovim/.deps/usr/lib/libvterm.a; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA54E1CFF79A400673FDF /* Bridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Bridge.h; sourceTree = "<group>"; };
|
||||
4BEBA6611D0014A400673FDF /* nvim */ = {isa = PBXFileReference; lastKnownFileType = folder; name = nvim; path = neovim/src/nvim; sourceTree = SOURCE_ROOT; };
|
||||
4BEBA6621D00157A00673FDF /* runtime */ = {isa = PBXFileReference; lastKnownFileType = folder; name = runtime; path = neovim/runtime; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4B2A2BC11D021C860074CE9A /* Frameworks */ = {
|
||||
4BEBA5021CFF374B00673FDF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4B2A2BD01D021C860074CE9A /* Frameworks */ = {
|
||||
4BEBA5111CFF374B00673FDF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4BEBA5241CFF3DFF00673FDF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BEBA54A1CFF5EA500673FDF /* libuv.a in Frameworks */,
|
||||
4BEBA5391CFF5E5D00673FDF /* libnvim.a in Frameworks */,
|
||||
4BEBA5431CFF5EA500673FDF /* libjemalloc_pic.a in Frameworks */,
|
||||
4BEBA5461CFF5EA500673FDF /* libluv.a in Frameworks */,
|
||||
4BEBA54B1CFF5EA500673FDF /* libvterm.a in Frameworks */,
|
||||
4BEBA5441CFF5EA500673FDF /* libjemalloc.a in Frameworks */,
|
||||
4BEBA5471CFF5EA500673FDF /* libmsgpack.a in Frameworks */,
|
||||
4BEBA5451CFF5EA500673FDF /* libluajit-5.1.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4B2A2BBB1D021C860074CE9A = {
|
||||
4BEBA4FC1CFF374B00673FDF = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B2A2BC61D021C860074CE9A /* nvox */,
|
||||
4B2A2BD61D021C860074CE9A /* nvoxTests */,
|
||||
4B2A2BC51D021C860074CE9A /* Products */,
|
||||
4BEBA5071CFF374B00673FDF /* nvox */,
|
||||
4BEBA5171CFF374B00673FDF /* nvoxTests */,
|
||||
4BEBA5281CFF3DFF00673FDF /* NeoVimXpc */,
|
||||
4BEBA5061CFF374B00673FDF /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B2A2BC51D021C860074CE9A /* Products */ = {
|
||||
4BEBA5061CFF374B00673FDF /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B2A2BC41D021C860074CE9A /* nvox.app */,
|
||||
4B2A2BD31D021C860074CE9A /* nvoxTests.xctest */,
|
||||
4BEBA5051CFF374B00673FDF /* nvox.app */,
|
||||
4BEBA5141CFF374B00673FDF /* nvoxTests.xctest */,
|
||||
4BEBA5271CFF3DFF00673FDF /* NeoVimXpc.xpc */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B2A2BC61D021C860074CE9A /* nvox */ = {
|
||||
4BEBA5071CFF374B00673FDF /* nvox */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B2A2BC71D021C860074CE9A /* AppDelegate.swift */,
|
||||
4B2A2BC91D021C860074CE9A /* Assets.xcassets */,
|
||||
4B2A2BCB1D021C860074CE9A /* MainMenu.xib */,
|
||||
4B2A2BCE1D021C860074CE9A /* Info.plist */,
|
||||
4BEBA5081CFF374B00673FDF /* AppDelegate.swift */,
|
||||
4BEBA50A1CFF374B00673FDF /* Assets.xcassets */,
|
||||
4BEBA50C1CFF374B00673FDF /* MainMenu.xib */,
|
||||
4BEBA50F1CFF374B00673FDF /* Info.plist */,
|
||||
4BEBA54E1CFF79A400673FDF /* Bridge.h */,
|
||||
);
|
||||
path = nvox;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B2A2BD61D021C860074CE9A /* nvoxTests */ = {
|
||||
4BEBA5171CFF374B00673FDF /* nvoxTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B2A2BD71D021C860074CE9A /* nvoxTests.swift */,
|
||||
4B2A2BD91D021C860074CE9A /* Info.plist */,
|
||||
4BEBA5181CFF374B00673FDF /* nvoxTests.swift */,
|
||||
4BEBA51A1CFF374B00673FDF /* Info.plist */,
|
||||
);
|
||||
path = nvoxTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BEBA5281CFF3DFF00673FDF /* NeoVimXpc */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BEBA6611D0014A400673FDF /* nvim */,
|
||||
4BEBA6621D00157A00673FDF /* runtime */,
|
||||
4BEBA5371CFF5E4100673FDF /* libs */,
|
||||
4BEBA5291CFF3DFF00673FDF /* NeoVimXpc.h */,
|
||||
4BEBA52A1CFF3DFF00673FDF /* NeoVimXpcImpl.h */,
|
||||
4BEBA52B1CFF3DFF00673FDF /* NeoVimXpcImpl.m */,
|
||||
4BEBA52D1CFF3DFF00673FDF /* main.m */,
|
||||
4BEBA52F1CFF3DFF00673FDF /* Info.plist */,
|
||||
);
|
||||
path = NeoVimXpc;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BEBA5371CFF5E4100673FDF /* libs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BEBA53A1CFF5EA500673FDF /* libjemalloc_pic.a */,
|
||||
4BEBA53B1CFF5EA500673FDF /* libjemalloc.a */,
|
||||
4BEBA53C1CFF5EA500673FDF /* libluajit-5.1.a */,
|
||||
4BEBA53D1CFF5EA500673FDF /* libluv.a */,
|
||||
4BEBA53E1CFF5EA500673FDF /* libmsgpack.a */,
|
||||
4BEBA5411CFF5EA500673FDF /* libuv.a */,
|
||||
4BEBA5421CFF5EA500673FDF /* libvterm.a */,
|
||||
4BEBA5381CFF5E5D00673FDF /* libnvim.a */,
|
||||
);
|
||||
name = libs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4B2A2BC31D021C860074CE9A /* nvox */ = {
|
||||
4BEBA5041CFF374B00673FDF /* nvox */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4B2A2BDC1D021C860074CE9A /* Build configuration list for PBXNativeTarget "nvox" */;
|
||||
buildConfigurationList = 4BEBA51D1CFF374B00673FDF /* Build configuration list for PBXNativeTarget "nvox" */;
|
||||
buildPhases = (
|
||||
4B2A2BC01D021C860074CE9A /* Sources */,
|
||||
4B2A2BC11D021C860074CE9A /* Frameworks */,
|
||||
4B2A2BC21D021C860074CE9A /* Resources */,
|
||||
4BEBA5011CFF374B00673FDF /* Sources */,
|
||||
4BEBA5021CFF374B00673FDF /* Frameworks */,
|
||||
4BEBA5031CFF374B00673FDF /* Resources */,
|
||||
4BEBA5361CFF3DFF00673FDF /* Embed XPC Services */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4BEBA5311CFF3DFF00673FDF /* PBXTargetDependency */,
|
||||
);
|
||||
name = nvox;
|
||||
productName = nvox;
|
||||
productReference = 4B2A2BC41D021C860074CE9A /* nvox.app */;
|
||||
productReference = 4BEBA5051CFF374B00673FDF /* nvox.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
4B2A2BD21D021C860074CE9A /* nvoxTests */ = {
|
||||
4BEBA5131CFF374B00673FDF /* nvoxTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4B2A2BDF1D021C860074CE9A /* Build configuration list for PBXNativeTarget "nvoxTests" */;
|
||||
buildConfigurationList = 4BEBA5201CFF374B00673FDF /* Build configuration list for PBXNativeTarget "nvoxTests" */;
|
||||
buildPhases = (
|
||||
4B2A2BCF1D021C860074CE9A /* Sources */,
|
||||
4B2A2BD01D021C860074CE9A /* Frameworks */,
|
||||
4B2A2BD11D021C860074CE9A /* Resources */,
|
||||
4BEBA5101CFF374B00673FDF /* Sources */,
|
||||
4BEBA5111CFF374B00673FDF /* Frameworks */,
|
||||
4BEBA5121CFF374B00673FDF /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4B2A2BD51D021C860074CE9A /* PBXTargetDependency */,
|
||||
4BEBA5161CFF374B00673FDF /* PBXTargetDependency */,
|
||||
);
|
||||
name = nvoxTests;
|
||||
productName = nvoxTests;
|
||||
productReference = 4B2A2BD31D021C860074CE9A /* nvoxTests.xctest */;
|
||||
productReference = 4BEBA5141CFF374B00673FDF /* nvoxTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
4BEBA5261CFF3DFF00673FDF /* NeoVimXpc */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4BEBA5331CFF3DFF00673FDF /* Build configuration list for PBXNativeTarget "NeoVimXpc" */;
|
||||
buildPhases = (
|
||||
4B2A2BBA1D00C7200074CE9A /* ShellScript */,
|
||||
4BEBA5231CFF3DFF00673FDF /* Sources */,
|
||||
4BEBA5241CFF3DFF00673FDF /* Frameworks */,
|
||||
4BEBA5251CFF3DFF00673FDF /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = NeoVimXpc;
|
||||
productName = NeoVimXpc;
|
||||
productReference = 4BEBA5271CFF3DFF00673FDF /* NeoVimXpc.xpc */;
|
||||
productType = "com.apple.product-type.xpc-service";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4B2A2BBC1D021C860074CE9A /* Project object */ = {
|
||||
4BEBA4FD1CFF374B00673FDF /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0730;
|
||||
ORGANIZATIONNAME = "Tae Won Ha";
|
||||
TargetAttributes = {
|
||||
4B2A2BC31D021C860074CE9A = {
|
||||
4BEBA5041CFF374B00673FDF = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
};
|
||||
4B2A2BD21D021C860074CE9A = {
|
||||
4BEBA5131CFF374B00673FDF = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
TestTargetID = 4BEBA5041CFF374B00673FDF;
|
||||
};
|
||||
4BEBA5261CFF3DFF00673FDF = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
TestTargetID = 4B2A2BC31D021C860074CE9A;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 4B2A2BBF1D021C860074CE9A /* Build configuration list for PBXProject "nvox" */;
|
||||
buildConfigurationList = 4BEBA5001CFF374B00673FDF /* Build configuration list for PBXProject "nvox" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
@ -155,68 +276,107 @@
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 4B2A2BBB1D021C860074CE9A;
|
||||
productRefGroup = 4B2A2BC51D021C860074CE9A /* Products */;
|
||||
mainGroup = 4BEBA4FC1CFF374B00673FDF;
|
||||
productRefGroup = 4BEBA5061CFF374B00673FDF /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4B2A2BC31D021C860074CE9A /* nvox */,
|
||||
4B2A2BD21D021C860074CE9A /* nvoxTests */,
|
||||
4BEBA5041CFF374B00673FDF /* nvox */,
|
||||
4BEBA5131CFF374B00673FDF /* nvoxTests */,
|
||||
4BEBA5261CFF3DFF00673FDF /* NeoVimXpc */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4B2A2BC21D021C860074CE9A /* Resources */ = {
|
||||
4BEBA5031CFF374B00673FDF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B2A2BCA1D021C860074CE9A /* Assets.xcassets in Resources */,
|
||||
4B2A2BCD1D021C860074CE9A /* MainMenu.xib in Resources */,
|
||||
4BEBA50B1CFF374B00673FDF /* Assets.xcassets in Resources */,
|
||||
4BEBA50E1CFF374B00673FDF /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4B2A2BD11D021C860074CE9A /* Resources */ = {
|
||||
4BEBA5121CFF374B00673FDF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4BEBA5251CFF3DFF00673FDF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BEBA6631D00157A00673FDF /* runtime in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
4B2A2BBA1D00C7200074CE9A /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "pushd neovim\nmake libnvim\npopd";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4B2A2BC01D021C860074CE9A /* Sources */ = {
|
||||
4BEBA5011CFF374B00673FDF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B2A2BC81D021C860074CE9A /* AppDelegate.swift in Sources */,
|
||||
4BEBA5091CFF374B00673FDF /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4B2A2BCF1D021C860074CE9A /* Sources */ = {
|
||||
4BEBA5101CFF374B00673FDF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B2A2BD81D021C860074CE9A /* nvoxTests.swift in Sources */,
|
||||
4BEBA5191CFF374B00673FDF /* nvoxTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4BEBA5231CFF3DFF00673FDF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BEBA52E1CFF3DFF00673FDF /* main.m in Sources */,
|
||||
4BEBA52C1CFF3DFF00673FDF /* NeoVimXpcImpl.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4B2A2BD51D021C860074CE9A /* PBXTargetDependency */ = {
|
||||
4BEBA5161CFF374B00673FDF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4B2A2BC31D021C860074CE9A /* nvox */;
|
||||
targetProxy = 4B2A2BD41D021C860074CE9A /* PBXContainerItemProxy */;
|
||||
target = 4BEBA5041CFF374B00673FDF /* nvox */;
|
||||
targetProxy = 4BEBA5151CFF374B00673FDF /* PBXContainerItemProxy */;
|
||||
};
|
||||
4BEBA5311CFF3DFF00673FDF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4BEBA5261CFF3DFF00673FDF /* NeoVimXpc */;
|
||||
targetProxy = 4BEBA5301CFF3DFF00673FDF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
4B2A2BCB1D021C860074CE9A /* MainMenu.xib */ = {
|
||||
4BEBA50C1CFF374B00673FDF /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4B2A2BCC1D021C860074CE9A /* Base */,
|
||||
4BEBA50D1CFF374B00673FDF /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
@ -224,7 +384,7 @@
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4B2A2BDA1D021C860074CE9A /* Debug */ = {
|
||||
4BEBA51B1CFF374B00673FDF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@ -269,7 +429,7 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4B2A2BDB1D021C860074CE9A /* Release */ = {
|
||||
4BEBA51C1CFF374B00673FDF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
@ -306,7 +466,7 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4B2A2BDD1D021C860074CE9A /* Debug */ = {
|
||||
4BEBA51E1CFF374B00673FDF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
@ -315,10 +475,11 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.nvox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = nvox/Bridge.h;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4B2A2BDE1D021C860074CE9A /* Release */ = {
|
||||
4BEBA51F1CFF374B00673FDF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
@ -327,10 +488,11 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.nvox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = nvox/Bridge.h;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4B2A2BE01D021C860074CE9A /* Debug */ = {
|
||||
4BEBA5211CFF374B00673FDF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
@ -343,7 +505,7 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4B2A2BE11D021C860074CE9A /* Release */ = {
|
||||
4BEBA5221CFF374B00673FDF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
@ -356,35 +518,106 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4BEBA5341CFF3DFF00673FDF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
"INCLUDE_GENERATED_DECLARATIONS=1",
|
||||
"CUSTOM_UI=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
neovim/build/include,
|
||||
neovim/src,
|
||||
neovim/.deps/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = NeoVimXpc/Info.plist;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/neovim/build/lib",
|
||||
"$(PROJECT_DIR)/neovim/.deps/usr/lib",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
/usr/local/opt/gettext/lib/libintl.a,
|
||||
"-liconv",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.nvox.xpc;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4BEBA5351CFF3DFF00673FDF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"INCLUDE_GENERATED_DECLARATIONS=1",
|
||||
"CUSTOM_UI=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
neovim/build/include,
|
||||
neovim/src,
|
||||
neovim/.deps/usr/include,
|
||||
);
|
||||
INFOPLIST_FILE = NeoVimXpc/Info.plist;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/neovim/build/lib",
|
||||
"$(PROJECT_DIR)/neovim/.deps/usr/lib",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
/usr/local/opt/gettext/lib/libintl.a,
|
||||
"-liconv",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.nvox.xpc;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4B2A2BBF1D021C860074CE9A /* Build configuration list for PBXProject "nvox" */ = {
|
||||
4BEBA5001CFF374B00673FDF /* Build configuration list for PBXProject "nvox" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4B2A2BDA1D021C860074CE9A /* Debug */,
|
||||
4B2A2BDB1D021C860074CE9A /* Release */,
|
||||
4BEBA51B1CFF374B00673FDF /* Debug */,
|
||||
4BEBA51C1CFF374B00673FDF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4B2A2BDC1D021C860074CE9A /* Build configuration list for PBXNativeTarget "nvox" */ = {
|
||||
4BEBA51D1CFF374B00673FDF /* Build configuration list for PBXNativeTarget "nvox" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4B2A2BDD1D021C860074CE9A /* Debug */,
|
||||
4B2A2BDE1D021C860074CE9A /* Release */,
|
||||
4BEBA51E1CFF374B00673FDF /* Debug */,
|
||||
4BEBA51F1CFF374B00673FDF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4B2A2BDF1D021C860074CE9A /* Build configuration list for PBXNativeTarget "nvoxTests" */ = {
|
||||
4BEBA5201CFF374B00673FDF /* Build configuration list for PBXNativeTarget "nvoxTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4B2A2BE01D021C860074CE9A /* Debug */,
|
||||
4B2A2BE11D021C860074CE9A /* Release */,
|
||||
4BEBA5211CFF374B00673FDF /* Debug */,
|
||||
4BEBA5221CFF374B00673FDF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4BEBA5331CFF3DFF00673FDF /* Build configuration list for PBXNativeTarget "NeoVimXpc" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4BEBA5341CFF3DFF00673FDF /* Debug */,
|
||||
4BEBA5351CFF3DFF00673FDF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 4B2A2BBC1D021C860074CE9A /* Project object */;
|
||||
rootObject = 4BEBA4FD1CFF374B00673FDF /* Project object */;
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "66BC1D8203ACCBEFF8817D6F63DD9A39E700D148",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
|
||||
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
|
||||
"B447E4DAD0CE11899D07E700EF4CB595EB71D7BB" : 0,
|
||||
"66BC1D8203ACCBEFF8817D6F63DD9A39E700D148" : 0
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "25EF6668-D165-4337-8588-CCBE2E8BB306",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
||||
"B447E4DAD0CE11899D07E700EF4CB595EB71D7BB" : "nvox\/neovim\/",
|
||||
"66BC1D8203ACCBEFF8817D6F63DD9A39E700D148" : "nvox\/"
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintNameKey" : "nvox",
|
||||
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
|
||||
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "nvox.xcodeproj",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:qvacua\/nvox.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "66BC1D8203ACCBEFF8817D6F63DD9A39E700D148"
|
||||
},
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:qvacua\/neovim.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "B447E4DAD0CE11899D07E700EF4CB595EB71D7BB"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// nvox
|
||||
//
|
||||
// Created by Tae Won Ha on 03/06/16.
|
||||
// Copyright © 2016 Tae Won Ha. All rights reserved.
|
||||
//
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Cocoa
|
||||
|
||||
@ -12,16 +9,26 @@ import Cocoa
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
@IBOutlet weak var window: NSWindow!
|
||||
|
||||
|
||||
var xpcConnection: NSXPCConnection!
|
||||
|
||||
var neoVimXpc: NeoVimXpc!
|
||||
|
||||
func applicationDidFinishLaunching(aNotification: NSNotification) {
|
||||
// Insert code here to initialize your application
|
||||
xpcConnection = NSXPCConnection(serviceName: "com.qvacua.nvox.xpc")
|
||||
xpcConnection.remoteObjectInterface = NSXPCInterface(withProtocol: NeoVimXpc.self)
|
||||
xpcConnection.resume()
|
||||
|
||||
neoVimXpc = self.xpcConnection.remoteObjectProxy as! NeoVimXpc
|
||||
neoVimXpc.upperCaseString("Doing something from the main app...") { (result) in
|
||||
print(result)
|
||||
}
|
||||
|
||||
neoVimXpc.doSth();
|
||||
}
|
||||
|
||||
func applicationWillTerminate(aNotification: NSNotification) {
|
||||
// Insert code here to tear down your application
|
||||
xpcConnection.invalidate()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
11
nvox/Bridge.h
Normal file
11
nvox/Bridge.h
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#ifndef Bridge_h
|
||||
#define Bridge_h
|
||||
|
||||
#include "NeoVimXpc.h"
|
||||
|
||||
#endif /* Bridge_h */
|
@ -2,7 +2,7 @@
|
||||
// nvoxTests.swift
|
||||
// nvoxTests
|
||||
//
|
||||
// Created by Tae Won Ha on 03/06/16.
|
||||
// Created by Tae Won Ha on 01/06/16.
|
||||
// Copyright © 2016 Tae Won Ha. All rights reserved.
|
||||
//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user