637 lines
75 KiB
C#
637 lines
75 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
using static StgSharp.Graphics.GLFWlibrary;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
using System.Threading;
|
|
|
|
namespace StgSharp.Graphics
|
|
{
|
|
internal interface IglFramework
|
|
{
|
|
internal int Init();
|
|
internal unsafe void Terminate();
|
|
internal unsafe void InitHint(int hint, int value);
|
|
internal unsafe void GetVersion(int* major, int* minor, int* rev);
|
|
internal unsafe byte* GetVersionString();
|
|
internal unsafe int GetError(byte** description);
|
|
internal unsafe GLFWerrorfun SetErrorCallback(GLFWerrorfun callback);
|
|
internal unsafe IntPtr* GetMonitors(int* count);
|
|
internal unsafe IntPtr GetPrimaryMonitor();
|
|
internal unsafe void GetMonitorPos(IntPtr monitor, int* xpos, int* ypos);
|
|
internal unsafe void GetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height);
|
|
internal unsafe void GetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM);
|
|
internal unsafe void GetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale);
|
|
internal unsafe byte* GetMonitorName(IntPtr monitor);
|
|
internal unsafe void SetMonitorUserPointer(IntPtr monitor, void* pointer);
|
|
internal unsafe void* GetMonitorUserPointer(IntPtr monitor);
|
|
internal unsafe GLFWmonitorfun SetMonitorCallback(GLFWmonitorfun callback);
|
|
internal unsafe GLFWvidmode* GetVideoModes(IntPtr monitor, int* count);
|
|
internal unsafe GLFWvidmode* GetVideoMode(IntPtr monitor);
|
|
internal unsafe void SetGamma(IntPtr monitor, float gamma);
|
|
internal unsafe GLFWgammaramp* GetGammaRamp(IntPtr monitor);
|
|
internal unsafe void SetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp);
|
|
internal unsafe void DefaultWindowHints();
|
|
internal unsafe void WindowHint(int hint, int value);
|
|
internal unsafe void WindowHintString(int hint, byte* value);
|
|
internal unsafe IntPtr CreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share);
|
|
internal unsafe void DestroyWindow(IntPtr window);
|
|
internal unsafe int WindowShouldClose(IntPtr window);
|
|
internal unsafe void SetWindowShouldClose(IntPtr window, int value);
|
|
internal unsafe void SetWindowTitle(IntPtr window, byte* title);
|
|
internal unsafe void SetWindowIcon(IntPtr window, int count, GLFWimage* images);
|
|
internal unsafe void GetWindowPos(IntPtr window, int* xpos, int* ypos);
|
|
internal unsafe void SetWindowPos(IntPtr window, int xpos, int ypos);
|
|
internal unsafe void GetWindowSize(IntPtr window, int* width, int* height);
|
|
internal unsafe void SetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight);
|
|
internal unsafe void SetWindowAspectRatio(IntPtr window, int numer, int denom);
|
|
internal unsafe void SetWindowSize(IntPtr window, int width, int height);
|
|
internal unsafe void GetFramebufferSize(IntPtr window, int* width, int* height);
|
|
internal unsafe void GetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom);
|
|
internal unsafe void GetWindowContentScale(IntPtr window, float* xscale, float* yscale);
|
|
internal unsafe float GetWindowOpacity(IntPtr window);
|
|
internal unsafe void SetWindowOpacity(IntPtr window, float opacity);
|
|
internal unsafe void IconifyWindow(IntPtr window);
|
|
internal unsafe void RestoreWindow(IntPtr window);
|
|
internal unsafe void MaximizeWindow(IntPtr window);
|
|
internal unsafe void ShowWindow(IntPtr window);
|
|
internal unsafe void HideWindow(IntPtr window);
|
|
internal unsafe void FocusWindow(IntPtr window);
|
|
internal unsafe void RequestWindowAttention(IntPtr window);
|
|
internal unsafe IntPtr GetWindowMonitor(IntPtr window);
|
|
internal unsafe void SetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
|
internal unsafe int GetWindowAttrib(IntPtr window, int attrib);
|
|
internal unsafe void SetWindowAttrib(IntPtr window, int attrib, int value);
|
|
internal unsafe void SetWindowUserPointer(IntPtr window, void* pointer);
|
|
internal unsafe void* GetWindowUserPointer(IntPtr window);
|
|
internal unsafe GLFWwindowposfun SetWindowPosCallback(IntPtr window, GLFWwindowposfun callback);
|
|
internal unsafe GLFWwindowsizefun SetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback);
|
|
internal unsafe GLFWwindowclosefun SetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback);
|
|
internal unsafe GLFWwindowrefreshfun SetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback);
|
|
internal unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
|
internal unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
|
internal unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
|
internal unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback);
|
|
internal unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
|
internal unsafe void PollEvents();
|
|
internal unsafe void WaitEvents();
|
|
internal unsafe void WaitEventsTimeout(double timeout);
|
|
internal unsafe void PostEmptyEvent();
|
|
internal unsafe int GetInputMode(IntPtr window, int mode);
|
|
internal unsafe void SetInputMode(IntPtr window, int mode, int value);
|
|
internal unsafe int RawMouseMotionSupported();
|
|
internal unsafe byte* GetKeyName(int key, int scancode);
|
|
internal unsafe int GetKeyScancode(int key);
|
|
internal unsafe KeyStatus GetKey(IntPtr window, int key);
|
|
internal unsafe int GetMouseButton(IntPtr window, int button);
|
|
internal unsafe void GetCursorPos(IntPtr window, double* xpos, double* ypos);
|
|
internal unsafe void SetCursorPos(IntPtr window, double xpos, double ypos);
|
|
internal unsafe GLFWcursor* CreateCursor(GLFWimage* image, int xhot, int yhot);
|
|
internal unsafe GLFWcursor* CreateStandardCursor(int shape);
|
|
internal unsafe void DestroyCursor(GLFWcursor* cursor);
|
|
internal unsafe void SetCursor(IntPtr window, GLFWcursor* cursor);
|
|
internal unsafe GLFWkeyfun SetKeyCallback(IntPtr window, GLFWkeyfun callback);
|
|
internal unsafe GLFWcharfun SetCharCallback(IntPtr window, GLFWcharfun callback);
|
|
internal unsafe GLFWcharmodsfun SetCharModsCallback(IntPtr window, GLFWcharmodsfun callback);
|
|
internal unsafe GLFWmousebuttonfun SetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback);
|
|
internal unsafe GLFWcursorposfun SetCursorPosCallback(IntPtr window, GLFWcursorposfun callback);
|
|
internal unsafe GLFWcursorenterfun SetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback);
|
|
internal unsafe GLFWscrollfun SetScrollCallback(IntPtr window, GLFWscrollfun callback);
|
|
internal unsafe GLFWdropfun SetDropCallback(IntPtr window, GLFWdropfun callback);
|
|
internal unsafe int JoystickPresent(int jid);
|
|
internal unsafe float* GetJoystickAxes(int jid, int* count);
|
|
internal unsafe byte* GetJoystickButtons(int jid, int* count);
|
|
internal unsafe byte* GetJoystickHats(int jid, int* count);
|
|
internal unsafe byte* GetJoystickName(int jid);
|
|
internal unsafe byte* GetJoystickGUID(int jid);
|
|
internal unsafe void SetJoystickUserPointer(int jid, void* pointer);
|
|
internal unsafe void* GetJoystickUserPointer(int jid);
|
|
internal unsafe int JoystickIsGamepad(int jid);
|
|
internal unsafe GLFWjoystickfun SetJoystickCallback(GLFWjoystickfun callback);
|
|
internal unsafe int UpdateGamepadMappings(byte* str);
|
|
internal unsafe byte* GetGamepadName(int jid);
|
|
internal unsafe int GetGamepadState(int jid, GLFWgamepadstate* state);
|
|
internal unsafe void SetClipboardString(IntPtr window, byte* str);
|
|
internal unsafe byte* GetClipboardString(IntPtr window);
|
|
internal unsafe double GetTime();
|
|
internal unsafe void SetTime(double time);
|
|
internal unsafe ulong* GetTimerValue();
|
|
internal unsafe ulong* GetTimerFrequency();
|
|
internal unsafe void MakeContextCurrent(IntPtr window);
|
|
internal unsafe IntPtr GetCurrentContext();
|
|
internal unsafe void SwapBuffers(IntPtr window);
|
|
internal unsafe void SwapInterval(int interval);
|
|
internal unsafe int ExtensionSupported(byte* extension);
|
|
internal unsafe IntPtr GetProcAddress(string procname);
|
|
internal unsafe int VulkanSupported();
|
|
internal unsafe byte** GetRequiredInstanceExtensions(uint* count);
|
|
//internal unsafe GLFWvkproc GetInstanceProcAddress(VkInstance instance, byte* procname);
|
|
//internal unsafe int GetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint* queuefamily);
|
|
//internal unsafe VkResult CreateWindowSurface(VkInstance instance, IntPtr window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
|
|
|
}
|
|
|
|
internal class glFramework_PInvoke : IglFramework
|
|
{
|
|
#region api call
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwInit")] internal extern unsafe static int glfwInit();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwTerminate")] internal extern unsafe static void glfwTerminate();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwInitHint")] internal extern unsafe static void glfwInitHint(int hint, int value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetVersion")] internal extern unsafe static void glfwGetVersion(int* major, int* minor, int* rev);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetVersionString")] internal extern unsafe static byte* glfwGetVersionString();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetError")] internal extern unsafe static int glfwGetError(byte** description);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetErrorCallback")] internal extern unsafe static GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitors")] internal extern unsafe static IntPtr* glfwGetMonitors(int* count);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetPrimaryMonitor")] internal extern unsafe static IntPtr glfwGetPrimaryMonitor();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorPos")] internal extern unsafe static void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorWorkarea")] internal extern unsafe static void glfwGetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorPhysicalSize")] internal extern unsafe static void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorContentScale")] internal extern unsafe static void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorName")] internal extern unsafe static byte* glfwGetMonitorName(IntPtr monitor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetMonitorUserPointer")] internal extern unsafe static void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMonitorUserPointer")] internal extern unsafe static void* glfwGetMonitorUserPointer(IntPtr monitor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetMonitorCallback")] internal extern unsafe static GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetVideoModes")] internal extern unsafe static GLFWvidmode* glfwGetVideoModes(IntPtr monitor, int* count);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetVideoMode")] internal extern unsafe static GLFWvidmode* glfwGetVideoMode(IntPtr monitor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetGamma")] internal extern unsafe static void glfwSetGamma(IntPtr monitor, float gamma);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetGammaRamp")] internal extern unsafe static GLFWgammaramp* glfwGetGammaRamp(IntPtr monitor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetGammaRamp")] internal extern unsafe static void glfwSetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwDefaultWindowHints")] internal extern unsafe static void glfwDefaultWindowHints();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWindowHint")] internal extern unsafe static void glfwWindowHint(int hint, int value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWindowHintString")] internal extern unsafe static void glfwWindowHintString(int hint, byte* value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwCreateWindow")] internal extern unsafe static IntPtr glfwCreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwDestroyWindow")] internal extern unsafe static void glfwDestroyWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWindowShouldClose")] internal extern unsafe static int glfwWindowShouldClose(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowShouldClose")] internal extern unsafe static void glfwSetWindowShouldClose(IntPtr window, int value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowTitle")] internal extern unsafe static void glfwSetWindowTitle(IntPtr window, byte* title);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowIcon")] internal extern unsafe static void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowPos")] internal extern unsafe static void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowPos")] internal extern unsafe static void glfwSetWindowPos(IntPtr window, int xpos, int ypos);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowSize")] internal extern unsafe static void glfwGetWindowSize(IntPtr window, int* width, int* height);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowSizeLimits")] internal extern unsafe static void glfwSetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowAspectRatio")] internal extern unsafe static void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowSize")] internal extern unsafe static void glfwSetWindowSize(IntPtr window, int width, int height);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetFramebufferSize")] internal extern unsafe static void glfwGetFramebufferSize(IntPtr window, int* width, int* height);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowFrameSize")] internal extern unsafe static void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowContentScale")] internal extern unsafe static void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowOpacity")] internal extern unsafe static float glfwGetWindowOpacity(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowOpacity")] internal extern unsafe static void glfwSetWindowOpacity(IntPtr window, float opacity);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwIconifyWindow")] internal extern unsafe static void glfwIconifyWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwRestoreWindow")] internal extern unsafe static void glfwRestoreWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwMaximizeWindow")] internal extern unsafe static void glfwMaximizeWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwShowWindow")] internal extern unsafe static void glfwShowWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwHideWindow")] internal extern unsafe static void glfwHideWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwFocusWindow")] internal extern unsafe static void glfwFocusWindow(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwRequestWindowAttention")] internal extern unsafe static void glfwRequestWindowAttention(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowMonitor")] internal extern unsafe static IntPtr glfwGetWindowMonitor(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowMonitor")] internal extern unsafe static void glfwSetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowAttrib")] internal extern unsafe static int glfwGetWindowAttrib(IntPtr window, int attrib);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowAttrib")] internal extern unsafe static void glfwSetWindowAttrib(IntPtr window, int attrib, int value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowUserPointer")] internal extern unsafe static void glfwSetWindowUserPointer(IntPtr window, void* pointer);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetWindowUserPointer")] internal extern unsafe static void* glfwGetWindowUserPointer(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowPosCallback")] internal extern unsafe static GLFWwindowposfun glfwSetWindowPosCallback(IntPtr window, GLFWwindowposfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowSizeCallback")] internal extern unsafe static GLFWwindowsizefun glfwSetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowCloseCallback")] internal extern unsafe static GLFWwindowclosefun glfwSetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowRefreshCallback")] internal extern unsafe static GLFWwindowrefreshfun glfwSetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowFocusCallback")] internal extern unsafe static GLFWwindowfocusfun glfwSetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowIconifyCallback")] internal extern unsafe static GLFWwindowiconifyfun glfwSetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowMaximizeCallback")] internal extern unsafe static GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetFramebufferSizeCallback")] internal extern unsafe static FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetWindowContentScaleCallback")] internal extern unsafe static GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwPollEvents")] internal extern unsafe static void glfwPollEvents();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWaitEvents")] internal extern unsafe static void glfwWaitEvents();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwWaitEventsTimeout")] internal extern unsafe static void glfwWaitEventsTimeout(double timeout);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwPostEmptyEvent")] internal extern unsafe static void glfwPostEmptyEvent();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetInputMode")] internal extern unsafe static int glfwGetInputMode(IntPtr window, int mode);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetInputMode")] internal extern unsafe static void glfwSetInputMode(IntPtr window, int mode, int value);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwRawMouseMotionSupported")] internal extern unsafe static int glfwRawMouseMotionSupported();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetKeyName")] internal extern unsafe static byte* glfwGetKeyName(int key, int scancode);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetKeyScancode")] internal extern unsafe static int glfwGetKeyScancode(int key);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetKey")] internal extern unsafe static KeyStatus glfwGetKey(IntPtr window, int key);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetMouseButton")] internal extern unsafe static int glfwGetMouseButton(IntPtr window, int button);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetCursorPos")] internal extern unsafe static void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCursorPos")] internal extern unsafe static void glfwSetCursorPos(IntPtr window, double xpos, double ypos);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwCreateCursor")] internal extern unsafe static GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwCreateStandardCursor")] internal extern unsafe static GLFWcursor* glfwCreateStandardCursor(int shape);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwDestroyCursor")] internal extern unsafe static void glfwDestroyCursor(GLFWcursor* cursor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCursor")] internal extern unsafe static void glfwSetCursor(IntPtr window, GLFWcursor* cursor);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetKeyCallback")] internal extern unsafe static GLFWkeyfun glfwSetKeyCallback(IntPtr window, GLFWkeyfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCharCallback")] internal extern unsafe static GLFWcharfun glfwSetCharCallback(IntPtr window, GLFWcharfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCharModsCallback")] internal extern unsafe static GLFWcharmodsfun glfwSetCharModsCallback(IntPtr window, GLFWcharmodsfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetMouseButtonCallback")] internal extern unsafe static GLFWmousebuttonfun glfwSetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCursorPosCallback")] internal extern unsafe static GLFWcursorposfun glfwSetCursorPosCallback(IntPtr window, GLFWcursorposfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetCursorEnterCallback")] internal extern unsafe static GLFWcursorenterfun glfwSetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetScrollCallback")] internal extern unsafe static GLFWscrollfun glfwSetScrollCallback(IntPtr window, GLFWscrollfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetDropCallback")] internal extern unsafe static GLFWdropfun glfwSetDropCallback(IntPtr window, GLFWdropfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwJoystickPresent")] internal extern unsafe static int glfwJoystickPresent(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickAxes")] internal extern unsafe static float* glfwGetJoystickAxes(int jid, int* count);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickButtons")] internal extern unsafe static byte* glfwGetJoystickButtons(int jid, int* count);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickHats")] internal extern unsafe static byte* glfwGetJoystickHats(int jid, int* count);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickName")] internal extern unsafe static byte* glfwGetJoystickName(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickGUID")] internal extern unsafe static byte* glfwGetJoystickGUID(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetJoystickUserPointer")] internal extern unsafe static void glfwSetJoystickUserPointer(int jid, void* pointer);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetJoystickUserPointer")] internal extern unsafe static void* glfwGetJoystickUserPointer(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwJoystickIsGamepad")] internal extern unsafe static int glfwJoystickIsGamepad(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetJoystickCallback")] internal extern unsafe static GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwUpdateGamepadMappings")] internal extern unsafe static int glfwUpdateGamepadMappings(byte* str);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetGamepadName")] internal extern unsafe static byte* glfwGetGamepadName(int jid);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetGamepadState")] internal extern unsafe static int glfwGetGamepadState(int jid, GLFWgamepadstate* state);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetClipboardString")] internal extern unsafe static void glfwSetClipboardString(IntPtr window, byte* str);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetClipboardString")] internal extern unsafe static byte* glfwGetClipboardString(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetTime")] internal extern unsafe static double glfwGetTime();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSetTime")] internal extern unsafe static void glfwSetTime(double time);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetTimerValue")] internal extern unsafe static ulong* glfwGetTimerValue();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetTimerFrequency")] internal extern unsafe static ulong* glfwGetTimerFrequency();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwMakeContextCurrent")] internal extern unsafe static void glfwMakeContextCurrent(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetCurrentContext")] internal extern unsafe static IntPtr glfwGetCurrentContext();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSwapBuffers")] internal extern unsafe static void glfwSwapBuffers(IntPtr window);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwSwapInterval")] internal extern unsafe static void glfwSwapInterval(int interval);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwExtensionSupported")] internal extern unsafe static int glfwExtensionSupported(byte* extension);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetProcAddress", CharSet = CharSet.Ansi)] internal extern unsafe static IntPtr glfwGetProcAddress(string procname);
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwVulkanSupported")] internal extern unsafe static int glfwVulkanSupported();
|
|
[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetRequiredInstanceExtensions")] internal extern unsafe static byte** glfwGetRequiredInstanceExtensions(uint* count);
|
|
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetInstanceProcAddress")] internal extern unsafe static GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, byte* procname);
|
|
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwGetPhysicalDevicePresentationSupport")] internal extern unsafe static int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint* queuefamily);
|
|
//[DllImport(InternalIO.SSC_libname, EntryPoint = "glfwCreateWindowSurface")] internal extern unsafe static VkResult glfwCreateWindowSurface(VkInstance instance, IntPtr window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
|
#endregion
|
|
|
|
#region api
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int Init() => glfwInit();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void Terminate() => glfwTerminate();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void InitHint(int hint, int value) => glfwInitHint(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetVersion(int* major, int* minor, int* rev) => glfwGetVersion(major, minor, rev);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetVersionString() => glfwGetVersionString();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetError(byte** description) => glfwGetError(description);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWerrorfun SetErrorCallback(GLFWerrorfun callback) => glfwSetErrorCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr* GetMonitors(int* count) => glfwGetMonitors(count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetPrimaryMonitor() => glfwGetPrimaryMonitor();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorPos(IntPtr monitor, int* xpos, int* ypos) => glfwGetMonitorPos(monitor, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height) => glfwGetMonitorWorkarea(monitor, xpos, ypos, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM) => glfwGetMonitorPhysicalSize(monitor, widthMM, heightMM);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale) => glfwGetMonitorContentScale(monitor, xscale, yscale);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetMonitorName(IntPtr monitor) => glfwGetMonitorName(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetMonitorUserPointer(IntPtr monitor, void* pointer) => glfwSetMonitorUserPointer(monitor, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetMonitorUserPointer(IntPtr monitor) => glfwGetMonitorUserPointer(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWmonitorfun SetMonitorCallback(GLFWmonitorfun callback) => glfwSetMonitorCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvidmode* GetVideoModes(IntPtr monitor, int* count) => glfwGetVideoModes(monitor, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvidmode* GetVideoMode(IntPtr monitor) => glfwGetVideoMode(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetGamma(IntPtr monitor, float gamma) => glfwSetGamma(monitor, gamma);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWgammaramp* GetGammaRamp(IntPtr monitor) => glfwGetGammaRamp(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp) => glfwSetGammaRamp(monitor, ramp);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DefaultWindowHints() => glfwDefaultWindowHints();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WindowHint(int hint, int value) => glfwWindowHint(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WindowHintString(int hint, byte* value) => glfwWindowHintString(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr CreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share) => glfwCreateWindow(width, height, title, monitor, share);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DestroyWindow(IntPtr window) => glfwDestroyWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int WindowShouldClose(IntPtr window) => glfwWindowShouldClose(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowShouldClose(IntPtr window, int value) => glfwSetWindowShouldClose(window, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowTitle(IntPtr window, byte* title) => glfwSetWindowTitle(window, title);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowIcon(IntPtr window, int count, GLFWimage* images) => glfwSetWindowIcon(window, count, images);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowPos(IntPtr window, int* xpos, int* ypos) => glfwGetWindowPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowPos(IntPtr window, int xpos, int ypos) => glfwSetWindowPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowSize(IntPtr window, int* width, int* height) => glfwGetWindowSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight) => glfwSetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowAspectRatio(IntPtr window, int numer, int denom) => glfwSetWindowAspectRatio(window, numer, denom);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowSize(IntPtr window, int width, int height) => glfwSetWindowSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetFramebufferSize(IntPtr window, int* width, int* height) => glfwGetFramebufferSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom) => glfwGetWindowFrameSize(window, left, top, right, bottom);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowContentScale(IntPtr window, float* xscale, float* yscale) => glfwGetWindowContentScale(window, xscale, yscale);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe float GetWindowOpacity(IntPtr window) => glfwGetWindowOpacity(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowOpacity(IntPtr window, float opacity) => glfwSetWindowOpacity(window, opacity);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void IconifyWindow(IntPtr window) => glfwIconifyWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void RestoreWindow(IntPtr window) => glfwRestoreWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void MaximizeWindow(IntPtr window) => glfwMaximizeWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ShowWindow(IntPtr window) => glfwShowWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void HideWindow(IntPtr window) => glfwHideWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void FocusWindow(IntPtr window) => glfwFocusWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void RequestWindowAttention(IntPtr window) => glfwRequestWindowAttention(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetWindowMonitor(IntPtr window) => glfwGetWindowMonitor(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate) => glfwSetWindowMonitor(window, monitor, xpos, ypos, width, height, refreshRate);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetWindowAttrib(IntPtr window, int attrib) => glfwGetWindowAttrib(window, attrib);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowAttrib(IntPtr window, int attrib, int value) => glfwSetWindowAttrib(window, attrib, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowUserPointer(IntPtr window, void* pointer) => glfwSetWindowUserPointer(window, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetWindowUserPointer(IntPtr window) => glfwGetWindowUserPointer(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowposfun SetWindowPosCallback(IntPtr window, GLFWwindowposfun callback) => glfwSetWindowPosCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowsizefun SetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback) => glfwSetWindowSizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowclosefun SetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback) => glfwSetWindowCloseCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowrefreshfun SetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback) => glfwSetWindowRefreshCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback) => glfwSetWindowFocusCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback) => glfwSetWindowIconifyCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback) => glfwSetWindowMaximizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback) => glfwSetFramebufferSizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback) => glfwSetWindowContentScaleCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PollEvents() => glfwPollEvents();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEvents() => glfwWaitEvents();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEventsTimeout(double timeout) => glfwWaitEventsTimeout(timeout);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PostEmptyEvent() => glfwPostEmptyEvent();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetInputMode(IntPtr window, int mode) => glfwGetInputMode(window, mode);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetInputMode(IntPtr window, int mode, int value) => glfwSetInputMode(window, mode, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int RawMouseMotionSupported() => glfwRawMouseMotionSupported();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetKeyName(int key, int scancode) => glfwGetKeyName(key, scancode);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetKeyScancode(int key) => glfwGetKeyScancode(key);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe KeyStatus GetKey(IntPtr window, int key) => glfwGetKey(window, key);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetMouseButton(IntPtr window, int button) => glfwGetMouseButton(window, button);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetCursorPos(IntPtr window, double* xpos, double* ypos) => glfwGetCursorPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetCursorPos(IntPtr window, double xpos, double ypos) => glfwSetCursorPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursor* CreateCursor(GLFWimage* image, int xhot, int yhot) => glfwCreateCursor(image, xhot, yhot);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursor* CreateStandardCursor(int shape) => glfwCreateStandardCursor(shape);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DestroyCursor(GLFWcursor* cursor) => glfwDestroyCursor(cursor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetCursor(IntPtr window, GLFWcursor* cursor) => glfwSetCursor(window, cursor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWkeyfun SetKeyCallback(IntPtr window, GLFWkeyfun callback) => glfwSetKeyCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcharfun SetCharCallback(IntPtr window, GLFWcharfun callback) => glfwSetCharCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcharmodsfun SetCharModsCallback(IntPtr window, GLFWcharmodsfun callback) => glfwSetCharModsCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWmousebuttonfun SetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback) => glfwSetMouseButtonCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursorposfun SetCursorPosCallback(IntPtr window, GLFWcursorposfun callback) => glfwSetCursorPosCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursorenterfun SetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback) => glfwSetCursorEnterCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWscrollfun SetScrollCallback(IntPtr window, GLFWscrollfun callback) => glfwSetScrollCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWdropfun SetDropCallback(IntPtr window, GLFWdropfun callback) => glfwSetDropCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int JoystickPresent(int jid) => glfwJoystickPresent(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe float* GetJoystickAxes(int jid, int* count) => glfwGetJoystickAxes(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickButtons(int jid, int* count) => glfwGetJoystickButtons(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickHats(int jid, int* count) => glfwGetJoystickHats(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickName(int jid) => glfwGetJoystickName(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickGUID(int jid) => glfwGetJoystickGUID(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetJoystickUserPointer(int jid, void* pointer) => glfwSetJoystickUserPointer(jid, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetJoystickUserPointer(int jid) => glfwGetJoystickUserPointer(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int JoystickIsGamepad(int jid) => glfwJoystickIsGamepad(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWjoystickfun SetJoystickCallback(GLFWjoystickfun callback) => glfwSetJoystickCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int UpdateGamepadMappings(byte* str) => glfwUpdateGamepadMappings(str);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetGamepadName(int jid) => glfwGetGamepadName(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetGamepadState(int jid, GLFWgamepadstate* state) => glfwGetGamepadState(jid, state);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetClipboardString(IntPtr window, byte* str) => glfwSetClipboardString(window, str);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetClipboardString(IntPtr window) => glfwGetClipboardString(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe double GetTime() => glfwGetTime();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetTime(double time) => glfwSetTime(time);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe ulong* GetTimerValue() => glfwGetTimerValue();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe ulong* GetTimerFrequency() => glfwGetTimerFrequency();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void MakeContextCurrent(IntPtr window) => glfwMakeContextCurrent(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetCurrentContext() => glfwGetCurrentContext();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SwapBuffers(IntPtr window) => glfwSwapBuffers(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SwapInterval(int interval) => glfwSwapInterval(interval);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int ExtensionSupported(byte* extension) => glfwExtensionSupported(extension);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetProcAddress(string procname) => glfwGetProcAddress(procname);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int VulkanSupported() => glfwVulkanSupported();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte** GetRequiredInstanceExtensions(uint* count) => glfwGetRequiredInstanceExtensions(count);
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvkproc GetInstanceProcAddress(VkInstance instance, byte* procname)=>glfwGetInstanceProcAddress(instance, procname)
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint* queuefamily) => glfwGetPhysicalDevicePresentationSupport(instance, device, queuefamily);
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe VkResult CreateWindowSurface(VkInstance instance, IntPtr window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface)=>glfwCreateWindowSurface(instance, window, allocator, surface)
|
|
#endregion
|
|
|
|
}
|
|
|
|
internal class glFramework_Delegate : IglFramework
|
|
{
|
|
#region glfw api define
|
|
|
|
internal static glfwCreateCursor glfw_CreateCursor;
|
|
internal static glfwCreateStandardCursor glfw_CreateStandardCursor;
|
|
internal static glfwCreateWindow glfw_CreateWindow;
|
|
internal static glfwDefaultWindowHints glfw_DefaultWindowHints;
|
|
internal static glfwDestroyCursor glfw_DestroyCursor;
|
|
internal static glfwDestroyWindow glfw_DestroyWindow;
|
|
internal static glfwExtensionSupported glfw_ExtensionSupported;
|
|
internal static glfwFocusWindow glfw_FocusWindow;
|
|
internal static glfwGetClipboardString glfw_GetClipboardString;
|
|
internal static glfwGetCurrentContext glfw_GetCurrentContext;
|
|
internal static glfwGetCursorPos glfw_GetCursorPos;
|
|
internal static glfwGetError glfw_GetError;
|
|
internal static glfwGetFramebufferSize glfw_GetFramebufferSize;
|
|
internal static glfwGetGamepadName glfw_GetGamepadName;
|
|
internal static glfwGetGamepadState glfw_GetGamepadState;
|
|
internal static glfwGetGammaRamp glfw_GetGammaRamp;
|
|
internal static glfwGetInputMode glfw_GetInputMode;
|
|
internal static glfwGetJoystickAxes glfw_GetJoystickAxes;
|
|
internal static glfwGetJoystickButtons glfw_GetJoystickButtons;
|
|
internal static glfwGetJoystickGUID glfw_GetJoystickGUID;
|
|
internal static glfwGetJoystickHats glfw_GetJoystickHats;
|
|
internal static glfwGetJoystickName glfw_GetJoystickName;
|
|
internal static glfwGetJoystickUserPointer glfw_GetJoystickUserPointer;
|
|
internal static glfwGetKey glfw_GetKey;
|
|
internal static glfwGetKeyName glfw_GetKeyName;
|
|
internal static glfwGetKeyScancode glfw_GetKeyScancode;
|
|
internal static glfwGetMonitorContentScale glfw_GetMonitorContentScale;
|
|
internal static glfwGetMonitorName glfw_GetMonitorName;
|
|
internal static glfwGetMonitorPhysicalSize glfw_GetMonitorPhysicalSize;
|
|
internal static glfwGetMonitorPos glfw_GetMonitorPos;
|
|
internal static glfwGetMonitors glfw_GetMonitors;
|
|
internal static glfwGetMonitorUserPointer glfw_GetMonitorUserPointer;
|
|
internal static glfwGetMonitorWorkarea glfw_GetMonitorWorkarea;
|
|
internal static glfwGetMouseButton glfw_GetMouseButton;
|
|
internal static glfwGetPrimaryMonitor glfw_GetPrimaryMonitor;
|
|
internal static glfwGetProcAddress glfw_GetProcAddress;
|
|
internal static glfwGetRequiredInstanceExtensions glfw_GetRequiredInstanceExtensions;
|
|
internal static glfwGetTime glfw_GetTime;
|
|
internal static glfwGetTimerFrequency glfw_GetTimerFrequency;
|
|
internal static glfwGetTimerValue glfw_GetTimerValue;
|
|
internal static glfwGetVersion glfw_GetVersion;
|
|
internal static glfwGetVersionString glfw_GetVersionString;
|
|
internal static glfwGetVideoMode glfw_GetVideoMode;
|
|
internal static glfwGetVideoModes glfw_GetVideoModes;
|
|
internal static glfwGetWindowAttrib glfw_GetWindowAttrib;
|
|
internal static glfwGetWindowContentScale glfw_GetWindowContentScale;
|
|
internal static glfwGetWindowFrameSize glfw_GetWindowFrameSize;
|
|
internal static glfwGetWindowMonitor glfw_GetWindowMonitor;
|
|
internal static glfwGetWindowOpacity glfw_GetWindowOpacity;
|
|
internal static glfwGetWindowPos glfw_GetWindowPos;
|
|
internal static glfwGetWindowSize glfw_GetWindowSize;
|
|
internal static glfwGetWindowUserPointer glfw_GetWindowUserPointer;
|
|
internal static glfwHideWindow glfw_HideWindow;
|
|
internal static glfwIconifyWindow glfw_IconifyWindow;
|
|
internal static glfwInit glfw_Init;
|
|
internal static glfwInitHint glfw_InitHint;
|
|
internal static glfwJoystickIsGamepad glfw_JoystickIsGamepad;
|
|
internal static glfwJoystickPresent glfw_JoystickPresent;
|
|
internal static glfwMakeContextCurrent glfw_MakeContextCurrent;
|
|
internal static glfwMaximizeWindow glfw_MaximizeWindow;
|
|
internal static glfwPollEvents glfw_PollEvents;
|
|
internal static glfwPostEmptyEvent glfw_PostEmptyEvent;
|
|
internal static glfwRawMouseMotionSupported glfw_RawMouseMotionSupported;
|
|
internal static glfwRequestWindowAttention glfw_RequestWindowAttention;
|
|
internal static glfwRestoreWindow glfw_RestoreWindow;
|
|
internal static glfwSetCharCallback glfw_SetCharCallback;
|
|
internal static glfwSetCharModsCallback glfw_SetCharModsCallback;
|
|
internal static glfwSetClipboardString glfw_SetClipboardString;
|
|
internal static glfwSetCursor glfw_SetCursor;
|
|
internal static glfwSetCursorEnterCallback glfw_SetCursorEnterCallback;
|
|
internal static glfwSetCursorPos glfw_SetCursorPos;
|
|
internal static glfwSetCursorPosCallback glfw_SetCursorPosCallback;
|
|
internal static glfwSetDropCallback glfw_SetDropCallback;
|
|
internal static glfwSetErrorCallback glfw_SetErrorCallback;
|
|
internal static glfwSetFramebufferSizeCallback glfw_SetFramebufferSizeCallback;
|
|
internal static glfwSetGamma glfw_SetGamma;
|
|
internal static glfwSetGammaRamp glfw_SetGammaRamp;
|
|
internal static glfwSetInputMode glfw_SetInputMode;
|
|
internal static glfwSetJoystickCallback glfw_SetJoystickCallback;
|
|
internal static glfwSetJoystickUserPointer glfw_SetJoystickUserPointer;
|
|
internal static glfwSetKeyCallback glfw_SetKeyCallback;
|
|
internal static glfwSetMonitorCallback glfw_SetMonitorCallback;
|
|
internal static glfwSetMonitorUserPointer glfw_SetMonitorUserPointer;
|
|
internal static glfwSetMouseButtonCallback glfw_SetMouseButtonCallback;
|
|
internal static glfwSetScrollCallback glfw_SetScrollCallback;
|
|
internal static glfwSetTime glfw_SetTime;
|
|
internal static glfwSetWindowAspectRatio glfw_SetWindowAspectRatio;
|
|
internal static glfwSetWindowAttrib glfw_SetWindowAttrib;
|
|
internal static glfwSetWindowCloseCallback glfw_SetWindowCloseCallback;
|
|
internal static glfwSetWindowContentScaleCallback glfw_SetWindowContentScaleCallback;
|
|
internal static glfwSetWindowFocusCallback glfw_SetWindowFocusCallback;
|
|
internal static glfwSetWindowIcon glfw_SetWindowIcon;
|
|
internal static glfwSetWindowIconifyCallback glfw_SetWindowIconifyCallback;
|
|
internal static glfwSetWindowMaximizeCallback glfw_SetWindowMaximizeCallback;
|
|
internal static glfwSetWindowMonitor glfw_SetWindowMonitor;
|
|
internal static glfwSetWindowOpacity glfw_SetWindowOpacity;
|
|
internal static glfwSetWindowPos glfw_SetWindowPos;
|
|
internal static glfwSetWindowPosCallback glfw_SetWindowPosCallback;
|
|
internal static glfwSetWindowRefreshCallback glfw_SetWindowRefreshCallback;
|
|
internal static glfwSetWindowShouldClose glfw_SetWindowShouldClose;
|
|
internal static glfwSetWindowSize glfw_SetWindowSize;
|
|
internal static glfwSetWindowSizeCallback glfw_SetWindowSizeCallback;
|
|
internal static glfwSetWindowSizeLimits glfw_SetWindowSizeLimits;
|
|
internal static glfwSetWindowTitle glfw_SetWindowTitle;
|
|
internal static glfwSetWindowUserPointer glfw_SetWindowUserPointer;
|
|
internal static glfwShowWindow glfw_ShowWindow;
|
|
internal static glfwSwapBuffers glfw_SwapBuffers;
|
|
internal static glfwSwapInterval glfw_SwapInterval;
|
|
internal static glfwTerminate glfw_Terminate;
|
|
internal static glfwUpdateGamepadMappings glfw_UpdateGamepadMappings;
|
|
internal static glfwVulkanSupported glfw_VulkanSupported;
|
|
internal static glfwWaitEvents glfw_WaitEvents;
|
|
internal static glfwWaitEventsTimeout glfw_WaitEventsTimeout;
|
|
internal static glfwWindowHint glfw_WindowHint;
|
|
internal static glfwWindowHintString glfw_WindowHintString;
|
|
internal static glfwWindowShouldClose glfw_WindowShouldClose;
|
|
//internal [NotNull] static glfwGetInstanceProcAddress glfw_GetInstanceProcAddress;
|
|
//internal [NotNull] static glfwGetPhysicalDevicePresentationSupport glfw_GetPhysicalDevicePresentationSupport;
|
|
//internal [NotNull] static glfwCreateWindowSurface glfw_CreateWindowSurface;
|
|
|
|
|
|
#endregion
|
|
|
|
#region api
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int Init() => glfw_Init();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void Terminate() => glfw_Terminate();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void InitHint(int hint, int value) => glfw_InitHint(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetVersion(int* major, int* minor, int* rev) => glfw_GetVersion(major, minor, rev);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetVersionString() => glfw_GetVersionString();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetError(byte** description) => glfw_GetError(description);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWerrorfun SetErrorCallback(GLFWerrorfun callback) => glfw_SetErrorCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr* GetMonitors(int* count) => glfw_GetMonitors(count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetPrimaryMonitor() => glfw_GetPrimaryMonitor();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorPos(IntPtr monitor, int* xpos, int* ypos) => glfw_GetMonitorPos(monitor, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorWorkarea(IntPtr monitor, int* xpos, int* ypos, int* width, int* height) => glfw_GetMonitorWorkarea(monitor, xpos, ypos, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM) => glfw_GetMonitorPhysicalSize(monitor, widthMM, heightMM);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale) => glfw_GetMonitorContentScale(monitor, xscale, yscale);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetMonitorName(IntPtr monitor) => glfw_GetMonitorName(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetMonitorUserPointer(IntPtr monitor, void* pointer) => glfw_SetMonitorUserPointer(monitor, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetMonitorUserPointer(IntPtr monitor) => glfw_GetMonitorUserPointer(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWmonitorfun SetMonitorCallback(GLFWmonitorfun callback) => glfw_SetMonitorCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvidmode* GetVideoModes(IntPtr monitor, int* count) => glfw_GetVideoModes(monitor, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvidmode* GetVideoMode(IntPtr monitor) => glfw_GetVideoMode(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetGamma(IntPtr monitor, float gamma) => glfw_SetGamma(monitor, gamma);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWgammaramp* GetGammaRamp(IntPtr monitor) => glfw_GetGammaRamp(monitor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetGammaRamp(IntPtr monitor, GLFWgammaramp* ramp) => glfw_SetGammaRamp(monitor, ramp);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DefaultWindowHints() => glfw_DefaultWindowHints();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WindowHint(int hint, int value) => glfw_WindowHint(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WindowHintString(int hint, byte* value) => glfw_WindowHintString(hint, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr CreateWindow(int width, int height, byte[] title, IntPtr monitor, IntPtr share) => glfw_CreateWindow(width, height, title, monitor, share);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DestroyWindow(IntPtr window) => glfw_DestroyWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int WindowShouldClose(IntPtr window) => glfw_WindowShouldClose(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowShouldClose(IntPtr window, int value) => glfw_SetWindowShouldClose(window, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowTitle(IntPtr window, byte* title) => glfw_SetWindowTitle(window, title);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowIcon(IntPtr window, int count, GLFWimage* images) => glfw_SetWindowIcon(window, count, images);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowPos(IntPtr window, int* xpos, int* ypos) => glfw_GetWindowPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowPos(IntPtr window, int xpos, int ypos) => glfw_SetWindowPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowSize(IntPtr window, int* width, int* height) => glfw_GetWindowSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowSizeLimits(IntPtr window, int minwidth, int minheight, int maxwidth, int maxheight) => glfw_SetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowAspectRatio(IntPtr window, int numer, int denom) => glfw_SetWindowAspectRatio(window, numer, denom);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowSize(IntPtr window, int width, int height) => glfw_SetWindowSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetFramebufferSize(IntPtr window, int* width, int* height) => glfw_GetFramebufferSize(window, width, height);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom) => glfw_GetWindowFrameSize(window, left, top, right, bottom);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetWindowContentScale(IntPtr window, float* xscale, float* yscale) => glfw_GetWindowContentScale(window, xscale, yscale);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe float GetWindowOpacity(IntPtr window) => glfw_GetWindowOpacity(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowOpacity(IntPtr window, float opacity) => glfw_SetWindowOpacity(window, opacity);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void IconifyWindow(IntPtr window) => glfw_IconifyWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void RestoreWindow(IntPtr window) => glfw_RestoreWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void MaximizeWindow(IntPtr window) => glfw_MaximizeWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ShowWindow(IntPtr window) => glfw_ShowWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void HideWindow(IntPtr window) => glfw_HideWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void FocusWindow(IntPtr window) => glfw_FocusWindow(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void RequestWindowAttention(IntPtr window) => glfw_RequestWindowAttention(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetWindowMonitor(IntPtr window) => glfw_GetWindowMonitor(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowMonitor(IntPtr window, IntPtr monitor, int xpos, int ypos, int width, int height, int refreshRate) => glfw_SetWindowMonitor(window, monitor, xpos, ypos, width, height, refreshRate);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetWindowAttrib(IntPtr window, int attrib) => glfw_GetWindowAttrib(window, attrib);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowAttrib(IntPtr window, int attrib, int value) => glfw_SetWindowAttrib(window, attrib, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetWindowUserPointer(IntPtr window, void* pointer) => glfw_SetWindowUserPointer(window, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetWindowUserPointer(IntPtr window) => glfw_GetWindowUserPointer(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowposfun SetWindowPosCallback(IntPtr window, GLFWwindowposfun callback) => glfw_SetWindowPosCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowsizefun SetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback) => glfw_SetWindowSizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowclosefun SetWindowCloseCallback(IntPtr window, GLFWwindowclosefun callback) => glfw_SetWindowCloseCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowrefreshfun SetWindowRefreshCallback(IntPtr window, GLFWwindowrefreshfun callback) => glfw_SetWindowRefreshCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowfocusfun SetWindowFocusCallback(IntPtr window, GLFWwindowfocusfun callback) => glfw_SetWindowFocusCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowiconifyfun SetWindowIconifyCallback(IntPtr window, GLFWwindowiconifyfun callback) => glfw_SetWindowIconifyCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowmaximizefun SetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback) => glfw_SetWindowMaximizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe FramebuffersizeHandler SetFramebufferSizeCallback(IntPtr window, FrameBufferSizeHandler callback) => glfw_SetFramebufferSizeCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWwindowcontentscalefun SetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback) => glfw_SetWindowContentScaleCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PollEvents() => glfw_PollEvents();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEvents() => glfw_WaitEvents();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void WaitEventsTimeout(double timeout) => glfw_WaitEventsTimeout(timeout);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void PostEmptyEvent() => glfw_PostEmptyEvent();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetInputMode(IntPtr window, int mode) => glfw_GetInputMode(window, mode);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetInputMode(IntPtr window, int mode, int value) => glfw_SetInputMode(window, mode, value);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int RawMouseMotionSupported() => glfw_RawMouseMotionSupported();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetKeyName(int key, int scancode) => glfw_GetKeyName(key, scancode);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetKeyScancode(int key) => glfw_GetKeyScancode(key);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe KeyStatus GetKey(IntPtr window, int key) => glfw_GetKey(window, key);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetMouseButton(IntPtr window, int button) => glfw_GetMouseButton(window, button);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void GetCursorPos(IntPtr window, double* xpos, double* ypos) => glfw_GetCursorPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetCursorPos(IntPtr window, double xpos, double ypos) => glfw_SetCursorPos(window, xpos, ypos);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursor* CreateCursor(GLFWimage* image, int xhot, int yhot) => glfw_CreateCursor(image, xhot, yhot);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursor* CreateStandardCursor(int shape) => glfw_CreateStandardCursor(shape);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void DestroyCursor(GLFWcursor* cursor) => glfw_DestroyCursor(cursor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetCursor(IntPtr window, GLFWcursor* cursor) => glfw_SetCursor(window, cursor);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWkeyfun SetKeyCallback(IntPtr window, GLFWkeyfun callback) => glfw_SetKeyCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcharfun SetCharCallback(IntPtr window, GLFWcharfun callback) => glfw_SetCharCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcharmodsfun SetCharModsCallback(IntPtr window, GLFWcharmodsfun callback) => glfw_SetCharModsCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWmousebuttonfun SetMouseButtonCallback(IntPtr window, GLFWmousebuttonfun callback) => glfw_SetMouseButtonCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursorposfun SetCursorPosCallback(IntPtr window, GLFWcursorposfun callback) => glfw_SetCursorPosCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWcursorenterfun SetCursorEnterCallback(IntPtr window, GLFWcursorenterfun callback) => glfw_SetCursorEnterCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWscrollfun SetScrollCallback(IntPtr window, GLFWscrollfun callback) => glfw_SetScrollCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWdropfun SetDropCallback(IntPtr window, GLFWdropfun callback) => glfw_SetDropCallback(window, callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int JoystickPresent(int jid) => glfw_JoystickPresent(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe float* GetJoystickAxes(int jid, int* count) => glfw_GetJoystickAxes(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickButtons(int jid, int* count) => glfw_GetJoystickButtons(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickHats(int jid, int* count) => glfw_GetJoystickHats(jid, count);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickName(int jid) => glfw_GetJoystickName(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetJoystickGUID(int jid) => glfw_GetJoystickGUID(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetJoystickUserPointer(int jid, void* pointer) => glfw_SetJoystickUserPointer(jid, pointer);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void* GetJoystickUserPointer(int jid) => glfw_GetJoystickUserPointer(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int JoystickIsGamepad(int jid) => glfw_JoystickIsGamepad(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWjoystickfun SetJoystickCallback(GLFWjoystickfun callback) => glfw_SetJoystickCallback(callback);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int UpdateGamepadMappings(byte* str) => glfw_UpdateGamepadMappings(str);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetGamepadName(int jid) => glfw_GetGamepadName(jid);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetGamepadState(int jid, GLFWgamepadstate* state) => glfw_GetGamepadState(jid, state);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetClipboardString(IntPtr window, byte* str) => glfw_SetClipboardString(window, str);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte* GetClipboardString(IntPtr window) => glfw_GetClipboardString(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe double GetTime() => glfw_GetTime();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SetTime(double time) => glfw_SetTime(time);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe ulong* GetTimerValue() => glfw_GetTimerValue();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe ulong* GetTimerFrequency() => glfw_GetTimerFrequency();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void MakeContextCurrent(IntPtr window) => glfw_MakeContextCurrent(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetCurrentContext() => glfw_GetCurrentContext();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SwapBuffers(IntPtr window) => glfw_SwapBuffers(window);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void SwapInterval(int interval) => glfw_SwapInterval(interval);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int ExtensionSupported(byte* extension) => glfw_ExtensionSupported(extension);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe IntPtr GetProcAddress(string procname) => glfw_GetProcAddress(procname);
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int VulkanSupported() => glfw_VulkanSupported();
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe byte** GetRequiredInstanceExtensions(uint* count) => glfw_GetRequiredInstanceExtensions(count);
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe GLFWvkproc GetInstanceProcAddress(VkInstance instance, byte* procname)=>glfwGetInstanceProcAddress(instance, procname)
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe int GetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint* queuefamily) => glfw_GetPhysicalDevicePresentationSupport(instance, device, queuefamily);
|
|
//[MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe VkResult CreateWindowSurface(VkInstance instance, IntPtr window, VkAllocationCallbacks* allocator, VkSurfaceKHR* surface)=>glfwCreateWindowSurface(instance, window, allocator, surface)
|
|
#endregion
|
|
|
|
}
|
|
}
|