mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Merge pull request #290 from TomHarte/DragAndDrop
Adds drag and drop receivership to the SDL target.
This commit is contained in:
commit
9961d13e2d
@ -169,8 +169,6 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
|||||||
for(NSPasteboardItem *item in [[sender draggingPasteboard] pasteboardItems])
|
for(NSPasteboardItem *item in [[sender draggingPasteboard] pasteboardItems])
|
||||||
{
|
{
|
||||||
NSURL *URL = [NSURL URLWithString:[item stringForType:(__bridge NSString *)kUTTypeFileURL]];
|
NSURL *URL = [NSURL URLWithString:[item stringForType:(__bridge NSString *)kUTTypeFileURL]];
|
||||||
|
|
||||||
NSLog(@"%@", URL);
|
|
||||||
[self.delegate openGLView:self didReceiveFileAtURL:URL];
|
[self.delegate openGLView:self didReceiveFileAtURL:URL];
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
|
@ -339,6 +339,11 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SDL_DROPFILE: {
|
||||||
|
StaticAnalyser::Media media = StaticAnalyser::GetMedia(event.drop.file);
|
||||||
|
machine->configuration_target()->insert_media(media);
|
||||||
|
} break;
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
case SDL_KEYUP: {
|
case SDL_KEYUP: {
|
||||||
KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine();
|
KeyboardMachine::Machine *keyboard_machine = machine->keyboard_machine();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user