1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: native rendering mode on macOS

This commit is contained in:
Alexander Medvednikov
2021-01-23 10:25:40 +01:00
parent a3908414e4
commit d991712b3c
32 changed files with 492 additions and 152 deletions

33
thirdparty/sokol/sokol_app2.h vendored Normal file
View File

@@ -0,0 +1,33 @@
@implementation MyView2
// Alternative drawRect which calls a frame function with native Cocoa calls
- (void)drawRect:(NSRect)rect {
_sapp_call_frame2();
}
//- (BOOL)isOpaque {
// return NO;
//}
- (BOOL)canBecomeKeyView {
return YES;
}
- (BOOL)acceptsFirstResponder {
return YES;
}
- (void)mouseExited:(NSEvent*)event {
}
- (void)mouseDown:(NSEvent*)event {
}
- (BOOL)acceptsFirstMouse:(NSEvent *)event {
return YES;
}
@end