mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Open files from Finder in Skia/OSX port
This commit is contained in:
parent
e985227d95
commit
40c834f50a
@ -1,5 +1,5 @@
|
|||||||
// SHE library
|
// SHE library
|
||||||
// Copyright (C) 2012-2015 David Capello
|
// Copyright (C) 2012-2016 David Capello
|
||||||
//
|
//
|
||||||
// This file is released under the terms of the MIT license.
|
// This file is released under the terms of the MIT license.
|
||||||
// Read LICENSE.txt for more information.
|
// Read LICENSE.txt for more information.
|
||||||
@ -14,6 +14,7 @@
|
|||||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
|
||||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)app;
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)app;
|
||||||
- (void)applicationWillTerminate:(NSNotification*)notification;
|
- (void)applicationWillTerminate:(NSNotification*)notification;
|
||||||
|
- (BOOL)application:(NSApplication*)app openFile:(NSString*)filename;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// SHE library
|
// SHE library
|
||||||
// Copyright (C) 2012-2015 David Capello
|
// Copyright (C) 2012-2016 David Capello
|
||||||
//
|
//
|
||||||
// This file is released under the terms of the MIT license.
|
// This file is released under the terms of the MIT license.
|
||||||
// Read LICENSE.txt for more information.
|
// Read LICENSE.txt for more information.
|
||||||
@ -33,7 +33,20 @@
|
|||||||
{
|
{
|
||||||
she::Event ev;
|
she::Event ev;
|
||||||
ev.setType(she::Event::CloseDisplay);
|
ev.setType(she::Event::CloseDisplay);
|
||||||
she::instance()->eventQueue()->queueEvent(ev);
|
she::queue_event(ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)application:(NSApplication*)app openFile:(NSString*)filename
|
||||||
|
{
|
||||||
|
she::Event ev;
|
||||||
|
ev.setType(she::Event::DropFiles);
|
||||||
|
|
||||||
|
std::vector<std::string> files;
|
||||||
|
files.push_back([filename UTF8String]);
|
||||||
|
|
||||||
|
ev.setFiles(files);
|
||||||
|
she::queue_event(ev);
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user