mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
120366c3ac
Updates #2695
52 lines
1.1 KiB
Go
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
|
|
}
|