Debian Codegraph @

shiny/driver/mtldriver/internal/appkit/appkit.m

raw
1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build darwin
6
7 #import <Cocoa/Cocoa.h>
8 #include "appkit.h"
9
10 void * Window_ContentView(void * window) {
11 return ((NSWindow *)window).contentView;
12 }
13
14 void View_SetLayer(void * view, void * layer) {
15 ((NSView *)view).layer = (CALayer *)layer;
16 }
17
18 void View_SetWantsLayer(void * view, bool wantsLayer) {
19 ((NSView *)view).wantsLayer = wantsLayer;
20 }