From 47dea6fac41eaab2f84b095d3f7ec7ae726c3d5b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 22 Jul 2023 01:02:55 +0900 Subject: [PATCH] move internal/glfw/glfw to internal/cglfw --- .../{glfw/glfw => cglfw}/GLFW_C_REVISION.txt | 0 internal/{glfw/glfw => cglfw}/LICENSE | 0 internal/{glfw/glfw => cglfw}/LICENSE_glfw3 | 0 internal/{glfw/glfw => cglfw}/build.go | 2 +- .../{glfw/glfw => cglfw}/cocoa_init_darwin.m | 0 .../glfw => cglfw}/cocoa_monitor_darwin.m | 0 .../glfw => cglfw}/cocoa_platform_darwin.h | 0 .../{glfw/glfw => cglfw}/cocoa_time_darwin.c | 0 .../glfw => cglfw}/cocoa_window_darwin.m | 0 internal/{glfw/glfw => cglfw}/context.c | 0 internal/{glfw/glfw => cglfw}/context.go | 2 +- internal/{glfw/glfw => cglfw}/egl_context.c | 0 internal/{glfw/glfw => cglfw}/egl_context.h | 0 internal/{glfw/glfw => cglfw}/error.go | 2 +- internal/{glfw/glfw => cglfw}/glfw.go | 2 +- internal/{glfw/glfw => cglfw}/glfw3.h | 0 internal/{glfw/glfw => cglfw}/glfw3native.h | 0 .../{glfw/glfw => cglfw}/glx_context_linbsd.c | 0 .../{glfw/glfw => cglfw}/glx_context_linbsd.h | 0 internal/{glfw/glfw => cglfw}/init.c | 0 internal/{glfw/glfw => cglfw}/input.c | 0 internal/{glfw/glfw => cglfw}/input.go | 2 +- internal/{glfw/glfw => cglfw}/internal.h | 0 internal/{glfw/glfw => cglfw}/monitor.c | 0 internal/{glfw/glfw => cglfw}/monitor.go | 2 +- .../{glfw/glfw => cglfw}/native_darwin.go | 2 +- .../glfw => cglfw}/native_linbsd_wayland.go | 2 +- .../{glfw/glfw => cglfw}/native_linbsd_x11.go | 2 +- .../glfw => cglfw}/nsgl_context_darwin.h | 0 .../glfw => cglfw}/nsgl_context_darwin.m | 0 .../{glfw/glfw => cglfw}/osmesa_context.c | 0 .../{glfw/glfw => cglfw}/osmesa_context.h | 0 internal/{glfw/glfw => cglfw}/posix_thread.c | 0 internal/{glfw/glfw => cglfw}/posix_thread.h | 0 .../{glfw/glfw => cglfw}/posix_time_linbsd.c | 0 .../{glfw/glfw => cglfw}/posix_time_linbsd.h | 0 internal/{glfw/glfw => cglfw}/util.go | 2 +- ...hibit-unstable-v1-client-protocol_linbsd.c | 0 ...hibit-unstable-v1-client-protocol_linbsd.h | 0 ...aints-unstable-v1-client-protocol_linbsd.c | 0 ...aints-unstable-v1-client-protocol_linbsd.h | 0 ...inter-unstable-v1-client-protocol_linbsd.c | 0 ...inter-unstable-v1-client-protocol_linbsd.h | 0 ...ayland-viewporter-client-protocol_linbsd.c | 0 ...ayland-viewporter-client-protocol_linbsd.h | 0 ...nd-xdg-decoration-client-protocol_linbsd.h | 0 ...ation-unstable-v1-client-protocol_linbsd.c | 0 ...wayland-xdg-shell-client-protocol_linbsd.c | 0 ...wayland-xdg-shell-client-protocol_linbsd.h | 0 internal/{glfw/glfw => cglfw}/window.c | 0 internal/{glfw/glfw => cglfw}/window.go | 2 +- .../{glfw/glfw => cglfw}/wl_init_linbsd.c | 0 .../{glfw/glfw => cglfw}/wl_monitor_linbsd.c | 0 .../{glfw/glfw => cglfw}/wl_platform_linbsd.h | 0 .../{glfw/glfw => cglfw}/wl_window_linbsd.c | 0 .../{glfw/glfw => cglfw}/x11_init_linbsd.c | 0 .../{glfw/glfw => cglfw}/x11_monitor_linbsd.c | 0 .../glfw => cglfw}/x11_platform_linbsd.h | 0 .../{glfw/glfw => cglfw}/x11_window_linbsd.c | 0 .../{glfw/glfw => cglfw}/xkb_unicode_linbsd.c | 0 .../{glfw/glfw => cglfw}/xkb_unicode_linbsd.h | 0 internal/glfw/callback_notwindows.go | 16 ++--- internal/glfw/glfw_notwindows.go | 64 +++++++++---------- internal/glfw/type_notwindows.go | 16 ++--- 64 files changed, 59 insertions(+), 59 deletions(-) rename internal/{glfw/glfw => cglfw}/GLFW_C_REVISION.txt (100%) rename internal/{glfw/glfw => cglfw}/LICENSE (100%) rename internal/{glfw/glfw => cglfw}/LICENSE_glfw3 (100%) rename internal/{glfw/glfw => cglfw}/build.go (98%) rename internal/{glfw/glfw => cglfw}/cocoa_init_darwin.m (100%) rename internal/{glfw/glfw => cglfw}/cocoa_monitor_darwin.m (100%) rename internal/{glfw/glfw => cglfw}/cocoa_platform_darwin.h (100%) rename internal/{glfw/glfw => cglfw}/cocoa_time_darwin.c (100%) rename internal/{glfw/glfw => cglfw}/cocoa_window_darwin.m (100%) rename internal/{glfw/glfw => cglfw}/context.c (100%) rename internal/{glfw/glfw => cglfw}/context.go (99%) rename internal/{glfw/glfw => cglfw}/egl_context.c (100%) rename internal/{glfw/glfw => cglfw}/egl_context.h (100%) rename internal/{glfw/glfw => cglfw}/error.go (99%) rename internal/{glfw/glfw => cglfw}/glfw.go (99%) rename internal/{glfw/glfw => cglfw}/glfw3.h (100%) rename internal/{glfw/glfw => cglfw}/glfw3native.h (100%) rename internal/{glfw/glfw => cglfw}/glx_context_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/glx_context_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/init.c (100%) rename internal/{glfw/glfw => cglfw}/input.c (100%) rename internal/{glfw/glfw => cglfw}/input.go (99%) rename internal/{glfw/glfw => cglfw}/internal.h (100%) rename internal/{glfw/glfw => cglfw}/monitor.c (100%) rename internal/{glfw/glfw => cglfw}/monitor.go (99%) rename internal/{glfw/glfw => cglfw}/native_darwin.go (98%) rename internal/{glfw/glfw => cglfw}/native_linbsd_wayland.go (98%) rename internal/{glfw/glfw => cglfw}/native_linbsd_x11.go (99%) rename internal/{glfw/glfw => cglfw}/nsgl_context_darwin.h (100%) rename internal/{glfw/glfw => cglfw}/nsgl_context_darwin.m (100%) rename internal/{glfw/glfw => cglfw}/osmesa_context.c (100%) rename internal/{glfw/glfw => cglfw}/osmesa_context.h (100%) rename internal/{glfw/glfw => cglfw}/posix_thread.c (100%) rename internal/{glfw/glfw => cglfw}/posix_thread.h (100%) rename internal/{glfw/glfw => cglfw}/posix_time_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/posix_time_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/util.go (96%) rename internal/{glfw/glfw => cglfw}/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wayland-viewporter-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-viewporter-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wayland-xdg-decoration-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wayland-xdg-decoration-unstable-v1-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-xdg-shell-client-protocol_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wayland-xdg-shell-client-protocol_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/window.c (100%) rename internal/{glfw/glfw => cglfw}/window.go (99%) rename internal/{glfw/glfw => cglfw}/wl_init_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wl_monitor_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/wl_platform_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/wl_window_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/x11_init_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/x11_monitor_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/x11_platform_linbsd.h (100%) rename internal/{glfw/glfw => cglfw}/x11_window_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/xkb_unicode_linbsd.c (100%) rename internal/{glfw/glfw => cglfw}/xkb_unicode_linbsd.h (100%) diff --git a/internal/glfw/glfw/GLFW_C_REVISION.txt b/internal/cglfw/GLFW_C_REVISION.txt similarity index 100% rename from internal/glfw/glfw/GLFW_C_REVISION.txt rename to internal/cglfw/GLFW_C_REVISION.txt diff --git a/internal/glfw/glfw/LICENSE b/internal/cglfw/LICENSE similarity index 100% rename from internal/glfw/glfw/LICENSE rename to internal/cglfw/LICENSE diff --git a/internal/glfw/glfw/LICENSE_glfw3 b/internal/cglfw/LICENSE_glfw3 similarity index 100% rename from internal/glfw/glfw/LICENSE_glfw3 rename to internal/cglfw/LICENSE_glfw3 diff --git a/internal/glfw/glfw/build.go b/internal/cglfw/build.go similarity index 98% rename from internal/glfw/glfw/build.go rename to internal/cglfw/build.go index 94df6a9f8..8853b0ee3 100644 --- a/internal/glfw/glfw/build.go +++ b/internal/cglfw/build.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw /* // Darwin Build Tags diff --git a/internal/glfw/glfw/cocoa_init_darwin.m b/internal/cglfw/cocoa_init_darwin.m similarity index 100% rename from internal/glfw/glfw/cocoa_init_darwin.m rename to internal/cglfw/cocoa_init_darwin.m diff --git a/internal/glfw/glfw/cocoa_monitor_darwin.m b/internal/cglfw/cocoa_monitor_darwin.m similarity index 100% rename from internal/glfw/glfw/cocoa_monitor_darwin.m rename to internal/cglfw/cocoa_monitor_darwin.m diff --git a/internal/glfw/glfw/cocoa_platform_darwin.h b/internal/cglfw/cocoa_platform_darwin.h similarity index 100% rename from internal/glfw/glfw/cocoa_platform_darwin.h rename to internal/cglfw/cocoa_platform_darwin.h diff --git a/internal/glfw/glfw/cocoa_time_darwin.c b/internal/cglfw/cocoa_time_darwin.c similarity index 100% rename from internal/glfw/glfw/cocoa_time_darwin.c rename to internal/cglfw/cocoa_time_darwin.c diff --git a/internal/glfw/glfw/cocoa_window_darwin.m b/internal/cglfw/cocoa_window_darwin.m similarity index 100% rename from internal/glfw/glfw/cocoa_window_darwin.m rename to internal/cglfw/cocoa_window_darwin.m diff --git a/internal/glfw/glfw/context.c b/internal/cglfw/context.c similarity index 100% rename from internal/glfw/glfw/context.c rename to internal/cglfw/context.c diff --git a/internal/glfw/glfw/context.go b/internal/cglfw/context.go similarity index 99% rename from internal/glfw/glfw/context.go rename to internal/cglfw/context.go index 237c91e6e..ef521e6a7 100644 --- a/internal/glfw/glfw/context.go +++ b/internal/cglfw/context.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw //#include //#define GLFW_INCLUDE_NONE diff --git a/internal/glfw/glfw/egl_context.c b/internal/cglfw/egl_context.c similarity index 100% rename from internal/glfw/glfw/egl_context.c rename to internal/cglfw/egl_context.c diff --git a/internal/glfw/glfw/egl_context.h b/internal/cglfw/egl_context.h similarity index 100% rename from internal/glfw/glfw/egl_context.h rename to internal/cglfw/egl_context.h diff --git a/internal/glfw/glfw/error.go b/internal/cglfw/error.go similarity index 99% rename from internal/glfw/glfw/error.go rename to internal/cglfw/error.go index b309b03ad..3a2ae111b 100644 --- a/internal/glfw/glfw/error.go +++ b/internal/cglfw/error.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw // #define GLFW_INCLUDE_NONE // #include "glfw3.h" diff --git a/internal/glfw/glfw/glfw.go b/internal/cglfw/glfw.go similarity index 99% rename from internal/glfw/glfw/glfw.go rename to internal/cglfw/glfw.go index ff7236d7f..586b700ac 100644 --- a/internal/glfw/glfw/glfw.go +++ b/internal/cglfw/glfw.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw //#include //#define GLFW_INCLUDE_NONE diff --git a/internal/glfw/glfw/glfw3.h b/internal/cglfw/glfw3.h similarity index 100% rename from internal/glfw/glfw/glfw3.h rename to internal/cglfw/glfw3.h diff --git a/internal/glfw/glfw/glfw3native.h b/internal/cglfw/glfw3native.h similarity index 100% rename from internal/glfw/glfw/glfw3native.h rename to internal/cglfw/glfw3native.h diff --git a/internal/glfw/glfw/glx_context_linbsd.c b/internal/cglfw/glx_context_linbsd.c similarity index 100% rename from internal/glfw/glfw/glx_context_linbsd.c rename to internal/cglfw/glx_context_linbsd.c diff --git a/internal/glfw/glfw/glx_context_linbsd.h b/internal/cglfw/glx_context_linbsd.h similarity index 100% rename from internal/glfw/glfw/glx_context_linbsd.h rename to internal/cglfw/glx_context_linbsd.h diff --git a/internal/glfw/glfw/init.c b/internal/cglfw/init.c similarity index 100% rename from internal/glfw/glfw/init.c rename to internal/cglfw/init.c diff --git a/internal/glfw/glfw/input.c b/internal/cglfw/input.c similarity index 100% rename from internal/glfw/glfw/input.c rename to internal/cglfw/input.c diff --git a/internal/glfw/glfw/input.go b/internal/cglfw/input.go similarity index 99% rename from internal/glfw/glfw/input.go rename to internal/cglfw/input.go index e12af4a94..1300f8567 100644 --- a/internal/glfw/glfw/input.go +++ b/internal/cglfw/input.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw // #include // #define GLFW_INCLUDE_NONE diff --git a/internal/glfw/glfw/internal.h b/internal/cglfw/internal.h similarity index 100% rename from internal/glfw/glfw/internal.h rename to internal/cglfw/internal.h diff --git a/internal/glfw/glfw/monitor.c b/internal/cglfw/monitor.c similarity index 100% rename from internal/glfw/glfw/monitor.c rename to internal/cglfw/monitor.c diff --git a/internal/glfw/glfw/monitor.go b/internal/cglfw/monitor.go similarity index 99% rename from internal/glfw/glfw/monitor.go rename to internal/cglfw/monitor.go index 0a477f850..4c96fe81a 100644 --- a/internal/glfw/glfw/monitor.go +++ b/internal/cglfw/monitor.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw // #define GLFW_INCLUDE_NONE // #include "glfw3.h" diff --git a/internal/glfw/glfw/native_darwin.go b/internal/cglfw/native_darwin.go similarity index 98% rename from internal/glfw/glfw/native_darwin.go rename to internal/cglfw/native_darwin.go index bda006011..3d22e99e9 100644 --- a/internal/glfw/glfw/native_darwin.go +++ b/internal/cglfw/native_darwin.go @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: 2012 The glfw3-go Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors -package glfw +package cglfw /* #define GLFW_EXPOSE_NATIVE_COCOA diff --git a/internal/glfw/glfw/native_linbsd_wayland.go b/internal/cglfw/native_linbsd_wayland.go similarity index 98% rename from internal/glfw/glfw/native_linbsd_wayland.go rename to internal/cglfw/native_linbsd_wayland.go index c892a8701..e1e470817 100644 --- a/internal/glfw/glfw/native_linbsd_wayland.go +++ b/internal/cglfw/native_linbsd_wayland.go @@ -4,7 +4,7 @@ //go:build (freebsd || linux || netbsd || openbsd) && wayland -package glfw +package cglfw //#include //#define GLFW_EXPOSE_NATIVE_WAYLAND diff --git a/internal/glfw/glfw/native_linbsd_x11.go b/internal/cglfw/native_linbsd_x11.go similarity index 99% rename from internal/glfw/glfw/native_linbsd_x11.go rename to internal/cglfw/native_linbsd_x11.go index 6c0e1bbed..e5616ccf7 100644 --- a/internal/glfw/glfw/native_linbsd_x11.go +++ b/internal/cglfw/native_linbsd_x11.go @@ -4,7 +4,7 @@ //go:build (freebsd || linux || netbsd || openbsd) && !wayland -package glfw +package cglfw //#include //#define GLFW_EXPOSE_NATIVE_X11 diff --git a/internal/glfw/glfw/nsgl_context_darwin.h b/internal/cglfw/nsgl_context_darwin.h similarity index 100% rename from internal/glfw/glfw/nsgl_context_darwin.h rename to internal/cglfw/nsgl_context_darwin.h diff --git a/internal/glfw/glfw/nsgl_context_darwin.m b/internal/cglfw/nsgl_context_darwin.m similarity index 100% rename from internal/glfw/glfw/nsgl_context_darwin.m rename to internal/cglfw/nsgl_context_darwin.m diff --git a/internal/glfw/glfw/osmesa_context.c b/internal/cglfw/osmesa_context.c similarity index 100% rename from internal/glfw/glfw/osmesa_context.c rename to internal/cglfw/osmesa_context.c diff --git a/internal/glfw/glfw/osmesa_context.h b/internal/cglfw/osmesa_context.h similarity index 100% rename from internal/glfw/glfw/osmesa_context.h rename to internal/cglfw/osmesa_context.h diff --git a/internal/glfw/glfw/posix_thread.c b/internal/cglfw/posix_thread.c similarity index 100% rename from internal/glfw/glfw/posix_thread.c rename to internal/cglfw/posix_thread.c diff --git a/internal/glfw/glfw/posix_thread.h b/internal/cglfw/posix_thread.h similarity index 100% rename from internal/glfw/glfw/posix_thread.h rename to internal/cglfw/posix_thread.h diff --git a/internal/glfw/glfw/posix_time_linbsd.c b/internal/cglfw/posix_time_linbsd.c similarity index 100% rename from internal/glfw/glfw/posix_time_linbsd.c rename to internal/cglfw/posix_time_linbsd.c diff --git a/internal/glfw/glfw/posix_time_linbsd.h b/internal/cglfw/posix_time_linbsd.h similarity index 100% rename from internal/glfw/glfw/posix_time_linbsd.h rename to internal/cglfw/posix_time_linbsd.h diff --git a/internal/glfw/glfw/util.go b/internal/cglfw/util.go similarity index 96% rename from internal/glfw/glfw/util.go rename to internal/cglfw/util.go index f32f17f08..c056ba67b 100644 --- a/internal/glfw/glfw/util.go +++ b/internal/cglfw/util.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw // #include import "C" diff --git a/internal/glfw/glfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.c b/internal/cglfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.c rename to internal/cglfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.h b/internal/cglfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.h rename to internal/cglfw/wayland-idle-inhibit-unstable-v1-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.c b/internal/cglfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.c rename to internal/cglfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.h b/internal/cglfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.h rename to internal/cglfw/wayland-pointer-constraints-unstable-v1-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.c b/internal/cglfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.c rename to internal/cglfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.h b/internal/cglfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.h rename to internal/cglfw/wayland-relative-pointer-unstable-v1-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/wayland-viewporter-client-protocol_linbsd.c b/internal/cglfw/wayland-viewporter-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-viewporter-client-protocol_linbsd.c rename to internal/cglfw/wayland-viewporter-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-viewporter-client-protocol_linbsd.h b/internal/cglfw/wayland-viewporter-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-viewporter-client-protocol_linbsd.h rename to internal/cglfw/wayland-viewporter-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/wayland-xdg-decoration-client-protocol_linbsd.h b/internal/cglfw/wayland-xdg-decoration-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-xdg-decoration-client-protocol_linbsd.h rename to internal/cglfw/wayland-xdg-decoration-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/wayland-xdg-decoration-unstable-v1-client-protocol_linbsd.c b/internal/cglfw/wayland-xdg-decoration-unstable-v1-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-xdg-decoration-unstable-v1-client-protocol_linbsd.c rename to internal/cglfw/wayland-xdg-decoration-unstable-v1-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-xdg-shell-client-protocol_linbsd.c b/internal/cglfw/wayland-xdg-shell-client-protocol_linbsd.c similarity index 100% rename from internal/glfw/glfw/wayland-xdg-shell-client-protocol_linbsd.c rename to internal/cglfw/wayland-xdg-shell-client-protocol_linbsd.c diff --git a/internal/glfw/glfw/wayland-xdg-shell-client-protocol_linbsd.h b/internal/cglfw/wayland-xdg-shell-client-protocol_linbsd.h similarity index 100% rename from internal/glfw/glfw/wayland-xdg-shell-client-protocol_linbsd.h rename to internal/cglfw/wayland-xdg-shell-client-protocol_linbsd.h diff --git a/internal/glfw/glfw/window.c b/internal/cglfw/window.c similarity index 100% rename from internal/glfw/glfw/window.c rename to internal/cglfw/window.c diff --git a/internal/glfw/glfw/window.go b/internal/cglfw/window.go similarity index 99% rename from internal/glfw/glfw/window.go rename to internal/cglfw/window.go index 8dad37ea6..da709bcf0 100644 --- a/internal/glfw/glfw/window.go +++ b/internal/cglfw/window.go @@ -4,7 +4,7 @@ //go:build darwin || freebsd || linux || netbsd || openbsd -package glfw +package cglfw // #include // #define GLFW_INCLUDE_NONE diff --git a/internal/glfw/glfw/wl_init_linbsd.c b/internal/cglfw/wl_init_linbsd.c similarity index 100% rename from internal/glfw/glfw/wl_init_linbsd.c rename to internal/cglfw/wl_init_linbsd.c diff --git a/internal/glfw/glfw/wl_monitor_linbsd.c b/internal/cglfw/wl_monitor_linbsd.c similarity index 100% rename from internal/glfw/glfw/wl_monitor_linbsd.c rename to internal/cglfw/wl_monitor_linbsd.c diff --git a/internal/glfw/glfw/wl_platform_linbsd.h b/internal/cglfw/wl_platform_linbsd.h similarity index 100% rename from internal/glfw/glfw/wl_platform_linbsd.h rename to internal/cglfw/wl_platform_linbsd.h diff --git a/internal/glfw/glfw/wl_window_linbsd.c b/internal/cglfw/wl_window_linbsd.c similarity index 100% rename from internal/glfw/glfw/wl_window_linbsd.c rename to internal/cglfw/wl_window_linbsd.c diff --git a/internal/glfw/glfw/x11_init_linbsd.c b/internal/cglfw/x11_init_linbsd.c similarity index 100% rename from internal/glfw/glfw/x11_init_linbsd.c rename to internal/cglfw/x11_init_linbsd.c diff --git a/internal/glfw/glfw/x11_monitor_linbsd.c b/internal/cglfw/x11_monitor_linbsd.c similarity index 100% rename from internal/glfw/glfw/x11_monitor_linbsd.c rename to internal/cglfw/x11_monitor_linbsd.c diff --git a/internal/glfw/glfw/x11_platform_linbsd.h b/internal/cglfw/x11_platform_linbsd.h similarity index 100% rename from internal/glfw/glfw/x11_platform_linbsd.h rename to internal/cglfw/x11_platform_linbsd.h diff --git a/internal/glfw/glfw/x11_window_linbsd.c b/internal/cglfw/x11_window_linbsd.c similarity index 100% rename from internal/glfw/glfw/x11_window_linbsd.c rename to internal/cglfw/x11_window_linbsd.c diff --git a/internal/glfw/glfw/xkb_unicode_linbsd.c b/internal/cglfw/xkb_unicode_linbsd.c similarity index 100% rename from internal/glfw/glfw/xkb_unicode_linbsd.c rename to internal/cglfw/xkb_unicode_linbsd.c diff --git a/internal/glfw/glfw/xkb_unicode_linbsd.h b/internal/cglfw/xkb_unicode_linbsd.h similarity index 100% rename from internal/glfw/glfw/xkb_unicode_linbsd.h rename to internal/cglfw/xkb_unicode_linbsd.h diff --git a/internal/glfw/callback_notwindows.go b/internal/glfw/callback_notwindows.go index 435e29546..99980e3c9 100644 --- a/internal/glfw/callback_notwindows.go +++ b/internal/glfw/callback_notwindows.go @@ -17,14 +17,14 @@ package glfw import ( - "github.com/hajimehoshi/ebiten/v2/internal/glfw/glfw" + "github.com/hajimehoshi/ebiten/v2/internal/cglfw" ) func ToCharModsCallback(cb func(window *Window, char rune, mods ModifierKey)) CharModsCallback { if cb == nil { return nil } - return func(window *glfw.Window, char rune, mods glfw.ModifierKey) { + return func(window *cglfw.Window, char rune, mods cglfw.ModifierKey) { cb(theWindows.get(window), char, ModifierKey(mods)) } } @@ -33,7 +33,7 @@ func ToCloseCallback(cb func(window *Window)) CloseCallback { if cb == nil { return nil } - return func(window *glfw.Window) { + return func(window *cglfw.Window) { cb(theWindows.get(window)) } } @@ -42,7 +42,7 @@ func ToDropCallback(cb func(window *Window, names []string)) DropCallback { if cb == nil { return nil } - return func(window *glfw.Window, names []string) { + return func(window *cglfw.Window, names []string) { cb(theWindows.get(window), names) } } @@ -51,7 +51,7 @@ func ToFramebufferSizeCallback(cb func(window *Window, width int, height int)) F if cb == nil { return nil } - return func(window *glfw.Window, width int, height int) { + return func(window *cglfw.Window, width int, height int) { cb(theWindows.get(window), width, height) } } @@ -60,7 +60,7 @@ func ToMonitorCallback(cb func(monitor *Monitor, event PeripheralEvent)) Monitor if cb == nil { return nil } - return func(monitor *glfw.Monitor, event glfw.PeripheralEvent) { + return func(monitor *cglfw.Monitor, event cglfw.PeripheralEvent) { var m *Monitor if monitor != nil { m = &Monitor{monitor} @@ -73,7 +73,7 @@ func ToScrollCallback(cb func(window *Window, xoff float64, yoff float64)) Scrol if cb == nil { return nil } - return func(window *glfw.Window, xoff float64, yoff float64) { + return func(window *cglfw.Window, xoff float64, yoff float64) { cb(theWindows.get(window), xoff, yoff) } } @@ -82,7 +82,7 @@ func ToSizeCallback(cb func(window *Window, width int, height int)) SizeCallback if cb == nil { return nil } - return func(window *glfw.Window, width, height int) { + return func(window *cglfw.Window, width, height int) { cb(theWindows.get(window), width, height) } } diff --git a/internal/glfw/glfw_notwindows.go b/internal/glfw/glfw_notwindows.go index 0d9ef7f74..d0549fe86 100644 --- a/internal/glfw/glfw_notwindows.go +++ b/internal/glfw/glfw_notwindows.go @@ -20,17 +20,17 @@ import ( "image" "sync" - "github.com/hajimehoshi/ebiten/v2/internal/glfw/glfw" + "github.com/hajimehoshi/ebiten/v2/internal/cglfw" ) -type windows map[*glfw.Window]*Window +type windows map[*cglfw.Window]*Window var ( theWindows = windows{} windowsM sync.Mutex ) -func (w windows) add(win *glfw.Window) *Window { +func (w windows) add(win *cglfw.Window) *Window { if win == nil { return nil } @@ -41,13 +41,13 @@ func (w windows) add(win *glfw.Window) *Window { return ww } -func (w windows) remove(win *glfw.Window) { +func (w windows) remove(win *cglfw.Window) { windowsM.Lock() delete(w, win) windowsM.Unlock() } -func (w windows) get(win *glfw.Window) *Window { +func (w windows) get(win *cglfw.Window) *Window { if win == nil { return nil } @@ -58,16 +58,16 @@ func (w windows) get(win *glfw.Window) *Window { } type Cursor struct { - c *glfw.Cursor + c *cglfw.Cursor } func CreateStandardCursor(shape StandardCursor) *Cursor { - c := glfw.CreateStandardCursor(glfw.StandardCursor(shape)) + c := cglfw.CreateStandardCursor(cglfw.StandardCursor(shape)) return &Cursor{c: c} } type Monitor struct { - m *glfw.Monitor + m *cglfw.Monitor } func (m *Monitor) GetContentScale() (float32, float32, error) { @@ -95,7 +95,7 @@ func (m *Monitor) GetVideoMode() *VidMode { } type Window struct { - w *glfw.Window + w *cglfw.Window prevSizeCallback SizeCallback } @@ -110,7 +110,7 @@ func (w *Window) Focus() { } func (w *Window) GetAttrib(attrib Hint) int { - return w.w.GetAttrib(glfw.Hint(attrib)) + return w.w.GetAttrib(cglfw.Hint(attrib)) } func (w *Window) GetCursorPos() (x, y float64) { @@ -118,11 +118,11 @@ func (w *Window) GetCursorPos() (x, y float64) { } func (w *Window) GetInputMode(mode InputMode) int { - return w.w.GetInputMode(glfw.InputMode(mode)) + return w.w.GetInputMode(cglfw.InputMode(mode)) } func (w *Window) GetKey(key Key) Action { - return Action(w.w.GetKey(glfw.Key(key))) + return Action(w.w.GetKey(cglfw.Key(key))) } func (w *Window) GetMonitor() *Monitor { @@ -134,7 +134,7 @@ func (w *Window) GetMonitor() *Monitor { } func (w *Window) GetMouseButton(button MouseButton) Action { - return Action(w.w.GetMouseButton(glfw.MouseButton(button))) + return Action(w.w.GetMouseButton(cglfw.MouseButton(button))) } func (w *Window) GetPos() (x, y int) { @@ -166,7 +166,7 @@ func (w *Window) Restore() { } func (w *Window) SetAttrib(attrib Hint, value int) { - w.w.SetAttrib(glfw.Hint(attrib), value) + w.w.SetAttrib(cglfw.Hint(attrib), value) } func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback) { @@ -175,7 +175,7 @@ func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsC } func (w *Window) SetCursor(cursor *Cursor) { - var c *glfw.Cursor + var c *cglfw.Cursor if cursor != nil { c = cursor.c } @@ -226,11 +226,11 @@ func (w *Window) SetIcon(images []image.Image) { } func (w *Window) SetInputMode(mode InputMode, value int) { - w.w.SetInputMode(glfw.InputMode(mode), value) + w.w.SetInputMode(cglfw.InputMode(mode), value) } func (w *Window) SetMonitor(monitor *Monitor, xpos, ypos, width, height, refreshRate int) { - var m *glfw.Monitor + var m *cglfw.Monitor if monitor != nil { m = monitor.m } @@ -262,16 +262,16 @@ func (w *Window) SwapBuffers() { } func CreateWindow(width, height int, title string, monitor *Monitor, share *Window) (*Window, error) { - var gm *glfw.Monitor + var gm *cglfw.Monitor if monitor != nil { gm = monitor.m } - var gw *glfw.Window + var gw *cglfw.Window if share != nil { gw = share.w } - w, err := glfw.CreateWindow(width, height, title, gm, gw) + w, err := cglfw.CreateWindow(width, height, title, gm, gw) if err != nil { return nil, err } @@ -279,12 +279,12 @@ func CreateWindow(width, height int, title string, monitor *Monitor, share *Wind } func GetKeyName(key Key, scancode int) string { - return glfw.GetKeyName(glfw.Key(key), scancode) + return cglfw.GetKeyName(cglfw.Key(key), scancode) } func GetMonitors() []*Monitor { ms := []*Monitor{} - for _, m := range glfw.GetMonitors() { + for _, m := range cglfw.GetMonitors() { if m != nil { ms = append(ms, &Monitor{m}) } else { @@ -295,7 +295,7 @@ func GetMonitors() []*Monitor { } func GetPrimaryMonitor() *Monitor { - m := glfw.GetPrimaryMonitor() + m := cglfw.GetPrimaryMonitor() if m == nil { return nil } @@ -303,38 +303,38 @@ func GetPrimaryMonitor() *Monitor { } func Init() error { - return glfw.Init() + return cglfw.Init() } func PollEvents() { - glfw.PollEvents() + cglfw.PollEvents() } func PostEmptyEvent() { - glfw.PostEmptyEvent() + cglfw.PostEmptyEvent() } func SetMonitorCallback(cbfun MonitorCallback) MonitorCallback { - glfw.SetMonitorCallback(cbfun) + cglfw.SetMonitorCallback(cbfun) return ToMonitorCallback(nil) } func SwapInterval(interval int) { - glfw.SwapInterval(interval) + cglfw.SwapInterval(interval) } func Terminate() { - glfw.Terminate() + cglfw.Terminate() } func WaitEvents() { - glfw.WaitEvents() + cglfw.WaitEvents() } func WaitEventsTimeout(timeout float64) { - glfw.WaitEventsTimeout(timeout) + cglfw.WaitEventsTimeout(timeout) } func WindowHint(target Hint, hint int) { - glfw.WindowHint(glfw.Hint(target), hint) + cglfw.WindowHint(cglfw.Hint(target), hint) } diff --git a/internal/glfw/type_notwindows.go b/internal/glfw/type_notwindows.go index 89b40cc75..f69e45f0b 100644 --- a/internal/glfw/type_notwindows.go +++ b/internal/glfw/type_notwindows.go @@ -17,17 +17,17 @@ package glfw import ( - "github.com/hajimehoshi/ebiten/v2/internal/glfw/glfw" + "github.com/hajimehoshi/ebiten/v2/internal/cglfw" ) type ( - CharModsCallback = glfw.CharModsCallback - CloseCallback = glfw.CloseCallback - DropCallback = glfw.DropCallback - FramebufferSizeCallback = glfw.FramebufferSizeCallback - MonitorCallback = glfw.MonitorCallback - ScrollCallback = glfw.ScrollCallback - SizeCallback = glfw.SizeCallback + CharModsCallback = cglfw.CharModsCallback + CloseCallback = cglfw.CloseCallback + DropCallback = cglfw.DropCallback + FramebufferSizeCallback = cglfw.FramebufferSizeCallback + MonitorCallback = cglfw.MonitorCallback + ScrollCallback = cglfw.ScrollCallback + SizeCallback = cglfw.SizeCallback ) type VidMode struct {