OSDN Git Service

Handling key and mouse events in listctrl is improved
[molby/Molby.git] / wxSources / modalwindow_osx.mm
1 /*
2  *  modalwindow_osx.mm
3  *  Molby
4  *
5  *  Created by Toshi Nagata on 14/09/19.
6  *  Copyright 2014 Toshi Nagata. All rights reserved.
7  *
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation version 2 of the License.
11  
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License for more details.
16  */
17
18 #import <Cocoa/Cocoa.h>
19
20 void
21 MacRunModalForWindow(void *w)
22 {
23         [NSApp runModalForWindow:(NSWindow *)w];
24 }
25
26 void
27 MacStopModal(void)
28 {
29         [NSApp stopModal];
30 }
31
32 void *
33 MacGetActiveWindow(void)
34 {
35         return [NSApp mainWindow];
36 }
37
38 /*
39 int
40 MacCheckEscapeKeyPressed(void)
41 {
42         NSEvent *ep = [NSApp nextEventMatchingMask:NSKeyDownMask untilDate:nil inMode:NSEventTrackingRunLoopMode dequeue:YES];
43         if (ep != nil && [[ep charactersIgnoringModifiers] characterAtIndex:0] == 0x1e) {
44                 return 1;
45         } else return 0;
46 }
47 */