ebiten/internal/cglfw/native_linbsd_wayland.go
2023-08-03 23:52:53 +09:00

52 lines
1.1 KiB
Go

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2012 The glfw3-go Authors
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors
//go:build (freebsd || linux || netbsd || openbsd) && wayland
package cglfw
//#include <stdlib.h>
//#define GLFW_EXPOSE_NATIVE_WAYLAND
//#define GLFW_EXPOSE_NATIVE_EGL
//#define GLFW_INCLUDE_NONE
//#include "glfw3.h"
//#include "glfw3native.h"
import "C"
func GetWaylandDisplay() *C.struct_wl_display {
ret := C.glfwGetWaylandDisplay()
panicError()
return ret
}
func (m *Monitor) GetWaylandMonitor() *C.struct_wl_output {
ret := C.glfwGetWaylandMonitor(m.data)
panicError()
return ret
}
func (w *Window) GetWaylandWindow() *C.struct_wl_surface {
ret := C.glfwGetWaylandWindow(w.data)
panicError()
return ret
}
func GetEGLDisplay() C.EGLDisplay {
ret := C.glfwGetEGLDisplay()
panicError()
return ret
}
func (w *Window) GetEGLContext() C.EGLContext {
ret := C.glfwGetEGLContext(w.data)
panicError()
return ret
}
func (w *Window) GetEGLSurface() C.EGLSurface {
ret := C.glfwGetEGLSurface(w.data)
panicError()
return ret
}