mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 16:35:36 +00:00
app/headless: fold header files into Go preambles
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -14,7 +14,12 @@ import (
|
||||
#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "headless_darwin.h"
|
||||
|
||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_headless_newContext(void);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_releaseContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_clearCurrentContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_makeCurrentContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_prepareContext(CFTypeRef ctxRef);
|
||||
*/
|
||||
import "C"
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
__attribute__ ((visibility ("hidden"))) CFTypeRef gio_headless_newContext(void);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_releaseContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_clearCurrentContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_makeCurrentContext(CFTypeRef ctxRef);
|
||||
__attribute__ ((visibility ("hidden"))) void gio_headless_prepareContext(CFTypeRef ctxRef);
|
||||
@@ -5,7 +5,7 @@
|
||||
@import OpenGLES;
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "headless_darwin.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
void gio_headless_releaseContext(CFTypeRef ctxRef) {
|
||||
CFBridgingRelease(ctxRef);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@import OpenGL.GL3;
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "headless_darwin.h"
|
||||
#include "_cgo_export.h"
|
||||
|
||||
void gio_headless_releaseContext(CFTypeRef ctxRef) {
|
||||
CFBridgingRelease(ctxRef);
|
||||
|
||||
Reference in New Issue
Block a user