add from giga-device, new branch added
This commit is contained in:
+692
@@ -0,0 +1,692 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfw.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
internal unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
private static GLFWFunction _glfw;
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "load_glfw_functions")]
|
||||
internal static unsafe partial void glfwLoadLibrary(GLFWFunction* context);
|
||||
|
||||
internal static unsafe void LoadGlfw()
|
||||
{
|
||||
_glfw = new GLFWFunction();
|
||||
fixed (GLFWFunction* func = &_glfw) { }
|
||||
}
|
||||
|
||||
#region api call
|
||||
|
||||
internal static unsafe int glfwInit()
|
||||
{
|
||||
return _glfw.glfwInit();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwTerminate()
|
||||
{
|
||||
_glfw.glfwTerminate();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwInitHint(int hint, int value)
|
||||
{
|
||||
_glfw.glfwInitHint(hint, value);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetVersion(int* major, int* minor, int* rev)
|
||||
{
|
||||
_glfw.glfwGetVersion(major, minor, rev);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetVersionString()
|
||||
{
|
||||
return _glfw.glfwGetVersionString();
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetError(byte** description)
|
||||
{
|
||||
return _glfw.glfwGetError(description);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<int, byte*, void> glfwSetErrorCallback(
|
||||
delegate* unmanaged[Cdecl]<int, byte*, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetErrorCallback(callback);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr* glfwGetMonitors(int* count)
|
||||
{
|
||||
return _glfw.glfwGetMonitors(count);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwGetPrimaryMonitor()
|
||||
{
|
||||
return _glfw.glfwGetPrimaryMonitor();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos)
|
||||
{
|
||||
_glfw.glfwGetMonitorPos(monitor, xpos, ypos);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorWorkarea(
|
||||
IntPtr monitor,
|
||||
int* xpos,
|
||||
int* ypos,
|
||||
int* width,
|
||||
int* height)
|
||||
{
|
||||
_glfw.glfwGetMonitorWorkarea(monitor, xpos, ypos, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM)
|
||||
{
|
||||
_glfw.glfwGetMonitorPhysicalSize(monitor, widthMM, heightMM);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale)
|
||||
{
|
||||
_glfw.glfwGetMonitorContentScale(monitor, xscale, yscale);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetMonitorName(IntPtr monitor)
|
||||
{
|
||||
return _glfw.glfwGetMonitorName(monitor);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer)
|
||||
{
|
||||
_glfw.glfwSetMonitorUserPointer(monitor, pointer);
|
||||
}
|
||||
|
||||
internal static unsafe void* glfwGetMonitorUserPointer(IntPtr monitor)
|
||||
{
|
||||
return _glfw.glfwGetMonitorUserPointer(monitor);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetMonitorCallback(
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetMonitorCallback(callback);
|
||||
}
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count)
|
||||
{
|
||||
return (glfwVideomode*)_glfw.glfwGetVideoModes(monitor, count);
|
||||
}
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoMode(IntPtr monitor)
|
||||
{
|
||||
return (glfwVideomode*)_glfw.glfwGetVideoMode(monitor);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetGamma(IntPtr monitor, float gamma)
|
||||
{
|
||||
_glfw.glfwSetGamma(monitor, gamma);
|
||||
}
|
||||
|
||||
internal static unsafe glfwGammaramp* glfwGetGammaRamp(IntPtr monitor)
|
||||
{
|
||||
return (glfwGammaramp*)_glfw.glfwGetGammaRamp(monitor);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp)
|
||||
{
|
||||
_glfw.glfwSetGammaRamp(monitor, (IntPtr)ramp);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwDefaultWindowHints()
|
||||
{
|
||||
_glfw.glfwDefaultWindowHints();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwWindowHint(int hint, int value)
|
||||
{
|
||||
_glfw.glfwWindowHint(hint, value);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwWindowHintString(int hint, byte* value)
|
||||
{
|
||||
_glfw.glfwWindowHintString(hint, value);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwCreateWindow(int width, int height, byte* title, IntPtr monitor, IntPtr share)
|
||||
{
|
||||
return _glfw.glfwCreateWindow(width, height, title, monitor, share);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwDestroyWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwDestroyWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwWindowShouldClose(IntPtr window)
|
||||
{
|
||||
return _glfw.glfwWindowShouldClose(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowShouldClose(IntPtr window, int value)
|
||||
{
|
||||
_glfw.glfwSetWindowShouldClose(window, value);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowTitle(IntPtr window, byte* title)
|
||||
{
|
||||
_glfw.glfwSetWindowTitle(window, title);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images)
|
||||
{
|
||||
_glfw.glfwSetWindowIcon(window, count, (IntPtr)images);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos)
|
||||
{
|
||||
_glfw.glfwGetWindowPos(window, xpos, ypos);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowPos(IntPtr window, int xpos, int ypos)
|
||||
{
|
||||
_glfw.glfwSetWindowPos(window, xpos, ypos);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetWindowSize(IntPtr window, int* width, int* height)
|
||||
{
|
||||
_glfw.glfwGetWindowSize(window, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowSizeLimits(
|
||||
IntPtr window,
|
||||
int minwidth,
|
||||
int minheight,
|
||||
int maxwidth,
|
||||
int maxheight)
|
||||
{
|
||||
_glfw.glfwSetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom)
|
||||
{
|
||||
_glfw.glfwSetWindowAspectRatio(window, numer, denom);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowSize(IntPtr window, int width, int height)
|
||||
{
|
||||
_glfw.glfwSetWindowSize(window, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetFramebufferSize(IntPtr window, int* width, int* height)
|
||||
{
|
||||
_glfw.glfwGetFramebufferSize(window, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom)
|
||||
{
|
||||
_glfw.glfwGetWindowFrameSize(window, left, top, right, bottom);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale)
|
||||
{
|
||||
_glfw.glfwGetWindowContentScale(window, xscale, yscale);
|
||||
}
|
||||
|
||||
internal static unsafe float glfwGetWindowOpacity(IntPtr window)
|
||||
{
|
||||
return _glfw.glfwGetWindowOpacity(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowOpacity(IntPtr window, float opacity)
|
||||
{
|
||||
_glfw.glfwSetWindowOpacity(window, opacity);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwIconifyWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwIconifyWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwRestoreWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwRestoreWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwMaximizeWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwMaximizeWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwShowWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwShowWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwHideWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwHideWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwFocusWindow(IntPtr window)
|
||||
{
|
||||
_glfw.glfwFocusWindow(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwRequestWindowAttention(IntPtr window)
|
||||
{
|
||||
_glfw.glfwRequestWindowAttention(window);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwGetWindowMonitor(IntPtr window)
|
||||
{
|
||||
return _glfw.glfwGetWindowMonitor(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowMonitor(
|
||||
IntPtr window,
|
||||
IntPtr monitor,
|
||||
int xpos,
|
||||
int ypos,
|
||||
int width,
|
||||
int height,
|
||||
int refreshRate)
|
||||
{
|
||||
_glfw.glfwSetWindowMonitor(window, monitor, xpos, ypos, width, height, refreshRate);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetWindowAttrib(IntPtr window, int attrib)
|
||||
{
|
||||
return _glfw.glfwGetWindowAttrib(window, attrib);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowAttrib(IntPtr window, int attrib, int value)
|
||||
{
|
||||
_glfw.glfwSetWindowAttrib(window, attrib, value);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetWindowUserPointer(IntPtr window, void* pointer)
|
||||
{
|
||||
_glfw.glfwSetWindowUserPointer(window, pointer);
|
||||
}
|
||||
|
||||
internal static unsafe void* glfwGetWindowUserPointer(IntPtr window)
|
||||
{
|
||||
return _glfw.glfwGetWindowUserPointer(window);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowPosCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowPosCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowSizeCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowSizeCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, void> glfwSetWindowCloseCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowCloseCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, void> glfwSetWindowRefreshCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowRefreshCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowFocusCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowFocusCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowIconifyCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowIconifyCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowMaximizeCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowMaximizeCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetFramebufferSizeCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetFramebufferSizeCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, float, float, void> glfwSetWindowContentScaleCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, float, float, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetWindowContentScaleCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwPollEvents()
|
||||
{
|
||||
_glfw.glfwPollEvents();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwWaitEvents()
|
||||
{
|
||||
_glfw.glfwWaitEvents();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwWaitEventsTimeout(double timeout)
|
||||
{
|
||||
_glfw.glfwWaitEventsTimeout(timeout);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwPostEmptyEvent()
|
||||
{
|
||||
_glfw.glfwPostEmptyEvent();
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetInputMode(IntPtr window, int mode)
|
||||
{
|
||||
return _glfw.glfwGetInputMode(window, mode);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetInputMode(IntPtr window, int mode, int value)
|
||||
{
|
||||
_glfw.glfwSetInputMode(window, mode, value);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwRawMouseMotionSupported()
|
||||
{
|
||||
return _glfw.glfwRawMouseMotionSupported();
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetKeyName(int key, int scancode)
|
||||
{
|
||||
return _glfw.glfwGetKeyName(key, scancode);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetKeyScancode(int key)
|
||||
{
|
||||
return _glfw.glfwGetKeyScancode(key);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetKey(IntPtr window, int key)
|
||||
{
|
||||
return _glfw.glfwGetKey(window, key);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetMouseButton(IntPtr window, int button)
|
||||
{
|
||||
return _glfw.glfwGetMouseButton(window, button);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos)
|
||||
{
|
||||
_glfw.glfwGetCursorPos(window, xpos, ypos);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetCursorPos(IntPtr window, double xpos, double ypos)
|
||||
{
|
||||
_glfw.glfwSetCursorPos(window, xpos, ypos);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwCreateCursor(GLFWimage* image, int xhot, int yhot)
|
||||
{
|
||||
return _glfw.glfwCreateCursor((IntPtr)image, xhot, yhot);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwCreateStandardCursor(int shape)
|
||||
{
|
||||
return _glfw.glfwCreateStandardCursor(shape);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwDestroyCursor(IntPtr cursor)
|
||||
{
|
||||
_glfw.glfwDestroyCursor(cursor);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetCursor(IntPtr window, IntPtr cursor)
|
||||
{
|
||||
_glfw.glfwSetCursor(window, cursor);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> glfwSetKeyCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetKeyCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, uint, void> glfwSetCharCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, uint, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetCharCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, uint, int, void> glfwSetCharModsCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, uint, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetCharModsCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void> glfwSetMouseButtonCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetMouseButtonCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetCursorPosCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, double, double, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetCursorPosCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetCursorEnterCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetCursorEnterCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetScrollCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, double, double, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetScrollCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void> glfwSetDropCallback(
|
||||
IntPtr window,
|
||||
delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetDropCallback(window, callback);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwJoystickPresent(int jid)
|
||||
{
|
||||
return _glfw.glfwJoystickPresent(jid);
|
||||
}
|
||||
|
||||
internal static unsafe float* glfwGetJoystickAxes(int jid, int* count)
|
||||
{
|
||||
return _glfw.glfwGetJoystickAxes(jid, count);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickButtons(int jid, int* count)
|
||||
{
|
||||
return _glfw.glfwGetJoystickButtons(jid, count);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickHats(int jid, int* count)
|
||||
{
|
||||
return _glfw.glfwGetJoystickHats(jid, count);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickName(int jid)
|
||||
{
|
||||
return _glfw.glfwGetJoystickName(jid);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickGUID(int jid)
|
||||
{
|
||||
return _glfw.glfwGetJoystickGUID(jid);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetJoystickUserPointer(int jid, void* pointer)
|
||||
{
|
||||
_glfw.glfwSetJoystickUserPointer(jid, pointer);
|
||||
}
|
||||
|
||||
internal static unsafe void* glfwGetJoystickUserPointer(int jid)
|
||||
{
|
||||
return _glfw.glfwGetJoystickUserPointer(jid);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwJoystickIsGamepad(int jid)
|
||||
{
|
||||
return _glfw.glfwJoystickIsGamepad(jid);
|
||||
}
|
||||
|
||||
internal static unsafe delegate* unmanaged[Cdecl]<int, int, void> glfwSetJoystickCallback(
|
||||
delegate* unmanaged[Cdecl]<int, int, void> callback)
|
||||
{
|
||||
return _glfw.glfwSetJoystickCallback(callback);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwUpdateGamepadMappings(byte* str)
|
||||
{
|
||||
return _glfw.glfwUpdateGamepadMappings(str);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetGamepadName(int jid)
|
||||
{
|
||||
return _glfw.glfwGetGamepadName(jid);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state)
|
||||
{
|
||||
return _glfw.glfwGetGamepadState(jid, (IntPtr)state);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetClipboardString(IntPtr window, byte* str)
|
||||
{
|
||||
_glfw.glfwSetClipboardString(window, str);
|
||||
}
|
||||
|
||||
internal static unsafe byte* glfwGetClipboardString(IntPtr window)
|
||||
{
|
||||
return _glfw.glfwGetClipboardString(window);
|
||||
}
|
||||
|
||||
internal static unsafe double glfwGetTime()
|
||||
{
|
||||
return _glfw.glfwGetTime();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSetTime(double time)
|
||||
{
|
||||
_glfw.glfwSetTime(time);
|
||||
}
|
||||
|
||||
internal static unsafe ulong glfwGetTimerValue()
|
||||
{
|
||||
return _glfw.glfwGetTimerValue();
|
||||
}
|
||||
|
||||
internal static unsafe ulong glfwGetTimerFrequency()
|
||||
{
|
||||
return _glfw.glfwGetTimerFrequency();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwMakeContextCurrent(IntPtr window)
|
||||
{
|
||||
_glfw.glfwMakeContextCurrent(window);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwGetCurrentContext()
|
||||
{
|
||||
return _glfw.glfwGetCurrentContext();
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSwapBuffers(IntPtr window)
|
||||
{
|
||||
_glfw.glfwSwapBuffers(window);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwSwapInterval(int interval)
|
||||
{
|
||||
_glfw.glfwSwapInterval(interval);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwExtensionSupported(byte* extension)
|
||||
{
|
||||
return _glfw.glfwExtensionSupported(extension);
|
||||
}
|
||||
|
||||
internal static unsafe IntPtr glfwGetProcAddress(byte* procname)
|
||||
{
|
||||
return _glfw.glfwGetProcAddress(procname);
|
||||
}
|
||||
|
||||
internal static unsafe int glfwVulkanSupported()
|
||||
{
|
||||
return _glfw.glfwVulkanSupported();
|
||||
}
|
||||
|
||||
internal static unsafe byte** glfwGetRequiredInstanceExtensions(uint* count)
|
||||
{
|
||||
return _glfw.glfwGetRequiredInstanceExtensions(count);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
#include "StgSharpNative.h"
|
||||
#include "glfw_function_table.h"
|
||||
#include <string.h>
|
||||
|
||||
void LoadGLFWFunctions(GLFWFunctionTable* table) {
|
||||
memset(table, 0, sizeof(GLFWFunctionTable));
|
||||
table->glfwInit = glfwInit;
|
||||
table->glfwTerminate = glfwTerminate;
|
||||
table->glfwInitHint = glfwInitHint;
|
||||
table->glfwGetVersion = glfwGetVersion;
|
||||
table->glfwGetVersionString = glfwGetVersionString;
|
||||
table->glfwGetError = glfwGetError;
|
||||
table->glfwSetErrorCallback = glfwSetErrorCallback;
|
||||
table->glfwGetMonitors = glfwGetMonitors;
|
||||
table->glfwGetPrimaryMonitor = glfwGetPrimaryMonitor;
|
||||
table->glfwGetMonitorPos = glfwGetMonitorPos;
|
||||
table->glfwGetMonitorWorkarea = glfwGetMonitorWorkarea;
|
||||
table->glfwGetMonitorPhysicalSize = glfwGetMonitorPhysicalSize;
|
||||
table->glfwGetMonitorContentScale = glfwGetMonitorContentScale;
|
||||
table->glfwGetMonitorName = glfwGetMonitorName;
|
||||
table->glfwSetMonitorUserPointer = glfwSetMonitorUserPointer;
|
||||
table->glfwGetMonitorUserPointer = glfwGetMonitorUserPointer;
|
||||
table->glfwSetMonitorCallback = glfwSetMonitorCallback;
|
||||
table->glfwGetVideoModes = glfwGetVideoModes;
|
||||
table->glfwGetVideoMode = glfwGetVideoMode;
|
||||
table->glfwSetGamma = glfwSetGamma;
|
||||
table->glfwGetGammaRamp = glfwGetGammaRamp;
|
||||
table->glfwSetGammaRamp = glfwSetGammaRamp;
|
||||
table->glfwDefaultWindowHints = glfwDefaultWindowHints;
|
||||
table->glfwWindowHint = glfwWindowHint;
|
||||
table->glfwWindowHintString = glfwWindowHintString;
|
||||
table->glfwCreateWindow = glfwCreateWindow;
|
||||
table->glfwDestroyWindow = glfwDestroyWindow;
|
||||
table->glfwWindowShouldClose = glfwWindowShouldClose;
|
||||
table->glfwSetWindowShouldClose = glfwSetWindowShouldClose;
|
||||
table->glfwSetWindowTitle = glfwSetWindowTitle;
|
||||
table->glfwSetWindowIcon = glfwSetWindowIcon;
|
||||
table->glfwGetWindowPos = glfwGetWindowPos;
|
||||
table->glfwSetWindowPos = glfwSetWindowPos;
|
||||
table->glfwGetWindowSize = glfwGetWindowSize;
|
||||
table->glfwSetWindowSizeLimits = glfwSetWindowSizeLimits;
|
||||
table->glfwSetWindowAspectRatio = glfwSetWindowAspectRatio;
|
||||
table->glfwSetWindowSize = glfwSetWindowSize;
|
||||
table->glfwGetFramebufferSize = glfwGetFramebufferSize;
|
||||
table->glfwGetWindowFrameSize = glfwGetWindowFrameSize;
|
||||
table->glfwGetWindowContentScale = glfwGetWindowContentScale;
|
||||
table->glfwGetWindowOpacity = glfwGetWindowOpacity;
|
||||
table->glfwSetWindowOpacity = glfwSetWindowOpacity;
|
||||
table->glfwIconifyWindow = glfwIconifyWindow;
|
||||
table->glfwRestoreWindow = glfwRestoreWindow;
|
||||
table->glfwMaximizeWindow = glfwMaximizeWindow;
|
||||
table->glfwShowWindow = glfwShowWindow;
|
||||
table->glfwHideWindow = glfwHideWindow;
|
||||
table->glfwFocusWindow = glfwFocusWindow;
|
||||
table->glfwRequestWindowAttention = glfwRequestWindowAttention;
|
||||
table->glfwGetWindowMonitor = glfwGetWindowMonitor;
|
||||
table->glfwSetWindowMonitor = glfwSetWindowMonitor;
|
||||
table->glfwGetWindowAttrib = glfwGetWindowAttrib;
|
||||
table->glfwSetWindowAttrib = glfwSetWindowAttrib;
|
||||
table->glfwSetWindowUserPointer = glfwSetWindowUserPointer;
|
||||
table->glfwGetWindowUserPointer = glfwGetWindowUserPointer;
|
||||
table->glfwSetWindowPosCallback = glfwSetWindowPosCallback;
|
||||
table->glfwSetWindowSizeCallback = glfwSetWindowSizeCallback;
|
||||
table->glfwSetWindowCloseCallback = glfwSetWindowCloseCallback;
|
||||
table->glfwSetWindowRefreshCallback = glfwSetWindowRefreshCallback;
|
||||
table->glfwSetWindowFocusCallback = glfwSetWindowFocusCallback;
|
||||
table->glfwSetWindowIconifyCallback = glfwSetWindowIconifyCallback;
|
||||
table->glfwSetWindowMaximizeCallback = glfwSetWindowMaximizeCallback;
|
||||
table->glfwSetFramebufferSizeCallback = glfwSetFramebufferSizeCallback;
|
||||
table->glfwSetWindowContentScaleCallback = glfwSetWindowContentScaleCallback;
|
||||
table->glfwPollEvents = glfwPollEvents;
|
||||
table->glfwWaitEvents = glfwWaitEvents;
|
||||
table->glfwWaitEventsTimeout = glfwWaitEventsTimeout;
|
||||
table->glfwPostEmptyEvent = glfwPostEmptyEvent;
|
||||
table->glfwGetInputMode = glfwGetInputMode;
|
||||
table->glfwSetInputMode = glfwSetInputMode;
|
||||
table->glfwRawMouseMotionSupported = glfwRawMouseMotionSupported;
|
||||
table->glfwGetKeyName = glfwGetKeyName;
|
||||
table->glfwGetKeyScancode = glfwGetKeyScancode;
|
||||
table->glfwGetKey = glfwGetKey;
|
||||
table->glfwGetMouseButton = glfwGetMouseButton;
|
||||
table->glfwGetCursorPos = glfwGetCursorPos;
|
||||
table->glfwSetCursorPos = glfwSetCursorPos;
|
||||
table->glfwCreateCursor = glfwCreateCursor;
|
||||
table->glfwCreateStandardCursor = glfwCreateStandardCursor;
|
||||
table->glfwDestroyCursor = glfwDestroyCursor;
|
||||
table->glfwSetCursor = glfwSetCursor;
|
||||
table->glfwSetKeyCallback = glfwSetKeyCallback;
|
||||
table->glfwSetCharCallback = glfwSetCharCallback;
|
||||
table->glfwSetCharModsCallback = glfwSetCharModsCallback;
|
||||
table->glfwSetMouseButtonCallback = glfwSetMouseButtonCallback;
|
||||
table->glfwSetCursorPosCallback = glfwSetCursorPosCallback;
|
||||
table->glfwSetCursorEnterCallback = glfwSetCursorEnterCallback;
|
||||
table->glfwSetScrollCallback = glfwSetScrollCallback;
|
||||
table->glfwSetDropCallback = glfwSetDropCallback;
|
||||
table->glfwJoystickPresent = glfwJoystickPresent;
|
||||
table->glfwGetJoystickAxes = glfwGetJoystickAxes;
|
||||
table->glfwGetJoystickButtons = glfwGetJoystickButtons;
|
||||
table->glfwGetJoystickGUID = glfwGetJoystickGUID;
|
||||
table->glfwGetJoystickHats = glfwGetJoystickHats;
|
||||
table->glfwGetJoystickName = glfwGetJoystickName;
|
||||
table->glfwGetJoystickUserPointer = glfwGetJoystickUserPointer;
|
||||
table->glfwJoystickIsGamepad = glfwJoystickIsGamepad;
|
||||
table->glfwSetJoystickCallback = glfwSetJoystickCallback;
|
||||
table->glfwUpdateGamepadMappings = glfwUpdateGamepadMappings;
|
||||
table->glfwGetGamepadName = glfwGetGamepadName;
|
||||
table->glfwGetGamepadState = glfwGetGamepadState;
|
||||
table->glfwSetClipboardString = glfwSetClipboardString;
|
||||
table->glfwGetClipboardString = glfwGetClipboardString;
|
||||
table->glfwGetTime = glfwGetTime;
|
||||
table->glfwSetTime = glfwSetTime;
|
||||
table->glfwGetTimerValue = glfwGetTimerValue;
|
||||
table->glfwGetTimerFrequency = glfwGetTimerFrequency;
|
||||
table->glfwMakeContextCurrent = glfwMakeContextCurrent;
|
||||
table->glfwGetCurrentContext = glfwGetCurrentContext;
|
||||
table->glfwSwapBuffers = glfwSwapBuffers;
|
||||
table->glfwSwapInterval = glfwSwapInterval;
|
||||
table->glfwExtensionSupported = glfwExtensionSupported;
|
||||
table->glfwGetProcAddress = glfwGetProcAddress;
|
||||
table->glfwVulkanSupported = glfwVulkanSupported;
|
||||
table->glfwGetRequiredInstanceExtensions = glfwGetRequiredInstanceExtensions;
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
#ifndef GLFW_FUNCTION_TABLE_H
|
||||
#define GLFW_FUNCTION_TABLE_H
|
||||
|
||||
#include "../glfw/glfw3.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GLFWFunctionTable {
|
||||
int (*glfwInit)(void);
|
||||
void (*glfwTerminate)(void);
|
||||
void (*glfwInitHint)(int hint, int value);
|
||||
void (*glfwGetVersion)(int* major, int* minor, int* rev);
|
||||
const char* (*glfwGetVersionString)(void);
|
||||
int (*glfwGetError)(const char** description);
|
||||
void* (*glfwSetErrorCallback)(void* callback);
|
||||
GLFWmonitor** (*glfwGetMonitors)(int* count);
|
||||
GLFWmonitor* (*glfwGetPrimaryMonitor)(void);
|
||||
void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
const char* (*glfwGetMonitorName)(GLFWmonitor* monitor);
|
||||
void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
|
||||
void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
|
||||
void* (*glfwSetMonitorCallback)(void* callback);
|
||||
const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGamma)(GLFWmonitor* monitor, float gamma);
|
||||
const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
void (*glfwDefaultWindowHints)(void);
|
||||
void (*glfwWindowHint)(int hint, int value);
|
||||
void (*glfwWindowHintString)(int hint, const char* value);
|
||||
GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void (*glfwDestroyWindow)(GLFWwindow* window);
|
||||
int (*glfwWindowShouldClose)(GLFWwindow* window);
|
||||
void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title);
|
||||
void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images);
|
||||
void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
float (*glfwGetWindowOpacity)(GLFWwindow* window);
|
||||
void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
void (*glfwIconifyWindow)(GLFWwindow* window);
|
||||
void (*glfwRestoreWindow)(GLFWwindow* window);
|
||||
void (*glfwMaximizeWindow)(GLFWwindow* window);
|
||||
void (*glfwShowWindow)(GLFWwindow* window);
|
||||
void (*glfwHideWindow)(GLFWwindow* window);
|
||||
void (*glfwFocusWindow)(GLFWwindow* window);
|
||||
void (*glfwRequestWindowAttention)(GLFWwindow* window);
|
||||
GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window);
|
||||
void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
void* (*glfwGetWindowUserPointer)(GLFWwindow* window);
|
||||
void* (*glfwSetWindowPosCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowSizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowCloseCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowRefreshCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowFocusCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowIconifyCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, void* callback);
|
||||
void (*glfwPollEvents)(void);
|
||||
void (*glfwWaitEvents)(void);
|
||||
void (*glfwWaitEventsTimeout)(double timeout);
|
||||
void (*glfwPostEmptyEvent)(void);
|
||||
int (*glfwGetInputMode)(GLFWwindow* window, int mode);
|
||||
void (*glfwSetInputMode)(GLFWwindow* window, int mode, int value);
|
||||
int (*glfwRawMouseMotionSupported)(void);
|
||||
const char* (*glfwGetKeyName)(int key, int scancode);
|
||||
int (*glfwGetKeyScancode)(int key);
|
||||
int (*glfwGetKey)(GLFWwindow* window, int key);
|
||||
int (*glfwGetMouseButton)(GLFWwindow* window, int button);
|
||||
void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursor* (*glfwCreateCursor)(const GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (*glfwCreateStandardCursor)(int shape);
|
||||
void (*glfwDestroyCursor)(GLFWcursor* cursor);
|
||||
void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
void* (*glfwSetKeyCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCharCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCharModsCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetMouseButtonCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCursorPosCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCursorEnterCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetScrollCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetDropCallback)(GLFWwindow* window, void* callback);
|
||||
int (*glfwJoystickPresent)(int jid);
|
||||
const float* (*glfwGetJoystickAxes)(int jid, int* count);
|
||||
const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickGUID)(int jid);
|
||||
const unsigned char* (*glfwGetJoystickHats)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickName)(int jid);
|
||||
void* (*glfwGetJoystickUserPointer)(int jid);
|
||||
int (*glfwJoystickIsGamepad)(int jid);
|
||||
void* (*glfwSetJoystickCallback)(void* callback);
|
||||
int (*glfwUpdateGamepadMappings)(const char* str);
|
||||
const char* (*glfwGetGamepadName)(int jid);
|
||||
int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
void (*glfwSetClipboardString)(GLFWwindow* window, const char* str);
|
||||
const char* (*glfwGetClipboardString)(GLFWwindow* window);
|
||||
double (*glfwGetTime)(void);
|
||||
void (*glfwSetTime)(double time);
|
||||
unsigned long long (*glfwGetTimerValue)(void);
|
||||
unsigned long long (*glfwGetTimerFrequency)(void);
|
||||
void (*glfwMakeContextCurrent)(GLFWwindow* window);
|
||||
GLFWwindow* (*glfwGetCurrentContext)(void);
|
||||
void (*glfwSwapBuffers)(GLFWwindow* window);
|
||||
void (*glfwSwapInterval)(int interval);
|
||||
int (*glfwExtensionSupported)(const char* extension);
|
||||
void* (*glfwGetProcAddress)(const char* procname);
|
||||
int (*glfwVulkanSupported)(void);
|
||||
const char** (*glfwGetRequiredInstanceExtensions)(unsigned int* count);
|
||||
} GLFWFunctionTable;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+366
@@ -0,0 +1,366 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfw.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
internal unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
private static GLFWFunction _glfw;
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "load_glfw_functions")]
|
||||
internal static unsafe partial void glfwLoadLibrary(GLFWFunction* context);
|
||||
|
||||
internal static unsafe void LoadGlfw()
|
||||
{
|
||||
_glfw = new GLFWFunction();
|
||||
fixed (GLFWFunction* func = &_glfw) { }
|
||||
}
|
||||
|
||||
#region api call
|
||||
|
||||
internal static unsafe int glfwInit() => _glfw.glfwInit();
|
||||
|
||||
internal static unsafe void glfwTerminate() => _glfw.glfwTerminate();
|
||||
|
||||
internal static unsafe void glfwInitHint(int hint, int value) => _glfw.glfwInitHint(hint, value);
|
||||
|
||||
internal static unsafe void glfwGetVersion(int* major, int* minor, int* rev) => _glfw.glfwGetVersion(major, minor, rev);
|
||||
|
||||
internal static unsafe byte* glfwGetVersionString() => _glfw.glfwGetVersionString();
|
||||
|
||||
internal static unsafe int glfwGetError(byte** description) => _glfw.glfwGetError(description);
|
||||
|
||||
internal static unsafe delegate*<int, byte*, void> glfwSetErrorCallback(delegate*<int, byte*, void> callback) => _glfw.glfwSetErrorCallback(callback);
|
||||
|
||||
internal static unsafe IntPtr* glfwGetMonitors(int* count) => _glfw.glfwGetMonitors(count);
|
||||
|
||||
internal static unsafe IntPtr glfwGetPrimaryMonitor() => _glfw.glfwGetPrimaryMonitor();
|
||||
|
||||
internal static unsafe void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos) => _glfw.glfwGetMonitorPos(monitor, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwGetMonitorWorkarea(
|
||||
IntPtr monitor,
|
||||
int* xpos,
|
||||
int* ypos,
|
||||
int* width,
|
||||
int* height)
|
||||
{
|
||||
_glfw.glfwGetMonitorWorkarea(monitor, xpos, ypos, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM) => _glfw.glfwGetMonitorPhysicalSize(monitor, widthMM, heightMM);
|
||||
|
||||
internal static unsafe void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale) => _glfw.glfwGetMonitorContentScale(monitor, xscale, yscale);
|
||||
|
||||
internal static unsafe byte* glfwGetMonitorName(IntPtr monitor) => _glfw.glfwGetMonitorName(monitor);
|
||||
|
||||
internal static unsafe void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer) => _glfw.glfwSetMonitorUserPointer(monitor, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetMonitorUserPointer(IntPtr monitor) => _glfw.glfwGetMonitorUserPointer(monitor);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetMonitorCallback(
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetMonitorCallback(callback);
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count) => _glfw.glfwGetVideoModes(monitor, count);
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoMode(IntPtr monitor) => _glfw.glfwGetVideoMode(monitor);
|
||||
|
||||
internal static unsafe void glfwSetGamma(IntPtr monitor, float gamma) => _glfw.glfwSetGamma(monitor, gamma);
|
||||
|
||||
internal static unsafe glfwGammaramp* glfwGetGammaRamp(IntPtr monitor) => _glfw.glfwGetGammaRamp(monitor);
|
||||
|
||||
internal static unsafe void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp) => _glfw.glfwSetGammaRamp(monitor, ramp);
|
||||
|
||||
internal static unsafe void glfwDefaultWindowHints() => _glfw.glfwDefaultWindowHints();
|
||||
|
||||
internal static unsafe void glfwWindowHint(int hint, int value) => _glfw.glfwWindowHint(hint, value);
|
||||
|
||||
internal static unsafe void glfwWindowHintString(int hint, byte* value) => _glfw.glfwWindowHintString(hint, value);
|
||||
|
||||
internal static unsafe IntPtr glfwCreateWindow(
|
||||
int width,
|
||||
int height,
|
||||
byte[] title,
|
||||
IntPtr monitor,
|
||||
IntPtr share) => _glfw.glfwCreateWindow(width, height, title, monitor, share);
|
||||
|
||||
internal static unsafe void glfwDestroyWindow(IntPtr window) => _glfw.glfwDestroyWindow(window);
|
||||
|
||||
internal static unsafe int glfwWindowShouldClose(IntPtr window) => _glfw.glfwWindowShouldClose(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowShouldClose(IntPtr window, int value) => _glfw.glfwSetWindowShouldClose(window, value);
|
||||
|
||||
internal static unsafe void glfwSetWindowTitle(IntPtr window, byte* title) => _glfw.glfwSetWindowTitle(window, title);
|
||||
|
||||
internal static unsafe void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images) => _glfw.glfwSetWindowIcon(window, count, images);
|
||||
|
||||
internal static unsafe void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos) => _glfw.glfwGetWindowPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwSetWindowPos(IntPtr window, int xpos, int ypos) => _glfw.glfwSetWindowPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwGetWindowSize(IntPtr window, int* width, int* height) => _glfw.glfwGetWindowSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwSetWindowSizeLimits(
|
||||
IntPtr window,
|
||||
int minwidth,
|
||||
int minheight,
|
||||
int maxwidth,
|
||||
int maxheight) => _glfw.glfwSetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight);
|
||||
|
||||
internal static unsafe void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom) => _glfw.glfwSetWindowAspectRatio(window, numer, denom);
|
||||
|
||||
internal static unsafe void glfwSetWindowSize(IntPtr window, int width, int height) => _glfw.glfwSetWindowSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwGetFramebufferSize(IntPtr window, int* width, int* height) => _glfw.glfwGetFramebufferSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom) => _glfw.glfwGetWindowFrameSize(window, left, top, right, bottom);
|
||||
|
||||
internal static unsafe void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale) => _glfw.glfwGetWindowContentScale(window, xscale, yscale);
|
||||
|
||||
internal static unsafe float glfwGetWindowOpacity(IntPtr window) => _glfw.glfwGetWindowOpacity(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowOpacity(IntPtr window, float opacity) => _glfw.glfwSetWindowOpacity(window, opacity);
|
||||
|
||||
internal static unsafe void glfwIconifyWindow(IntPtr window) => _glfw.glfwIconifyWindow(window);
|
||||
|
||||
internal static unsafe void glfwRestoreWindow(IntPtr window) => _glfw.glfwRestoreWindow(window);
|
||||
|
||||
internal static unsafe void glfwMaximizeWindow(IntPtr window) => _glfw.glfwMaximizeWindow(window);
|
||||
|
||||
internal static unsafe void glfwShowWindow(IntPtr window) => _glfw.glfwShowWindow(window);
|
||||
|
||||
internal static unsafe void glfwHideWindow(IntPtr window) => _glfw.glfwHideWindow(window);
|
||||
|
||||
internal static unsafe void glfwFocusWindow(IntPtr window) => _glfw.glfwFocusWindow(window);
|
||||
|
||||
internal static unsafe void glfwRequestWindowAttention(IntPtr window) => _glfw.glfwRequestWindowAttention(window);
|
||||
|
||||
internal static unsafe IntPtr glfwGetWindowMonitor(IntPtr window) => _glfw.glfwGetWindowMonitor(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowMonitor(
|
||||
IntPtr window,
|
||||
IntPtr monitor,
|
||||
int xpos,
|
||||
int ypos,
|
||||
int width,
|
||||
int height,
|
||||
int refreshRate) => _glfw.glfwSetWindowMonitor(
|
||||
window, monitor, xpos, ypos, width, height, refreshRate);
|
||||
|
||||
internal static unsafe int glfwGetWindowAttrib(IntPtr window, int attrib) => _glfw.glfwGetWindowAttrib(window, attrib);
|
||||
|
||||
internal static unsafe void glfwSetWindowAttrib(IntPtr window, int attrib, int value) => _glfw.glfwSetWindowAttrib(window, attrib, value);
|
||||
|
||||
internal static unsafe void glfwSetWindowUserPointer(IntPtr window, void* pointer) => _glfw.glfwSetWindowUserPointer(window, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetWindowUserPointer(IntPtr window) => _glfw.glfwGetWindowUserPointer(window);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetWindowPosCallback(
|
||||
IntPtr window,
|
||||
IntPtr callback) => _glfw.glfwSetWindowPosCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetWindowSizeCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, void> callback) => _glfw.glfwSetWindowSizeCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, void> glfwSetWindowCloseCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, void> callback) => _glfw.glfwSetWindowCloseCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, void> glfwSetWindowRefreshCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, void> callback) => _glfw.glfwSetWindowRefreshCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowFocusCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowFocusCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowIconifyCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowIconifyCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowMaximizeCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowMaximizeCallback(window, callback);
|
||||
|
||||
internal static unsafe FrameBufferSizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback) => _glfw.glfwSetFramebufferSizeCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, float, float> glfwSetWindowContentScaleCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, float, float> callback) => _glfw.glfwSetWindowContentScaleCallback(window, callback);
|
||||
|
||||
internal static unsafe void glfwPollEvents() => _glfw.glfwPollEvents();
|
||||
|
||||
internal static unsafe void glfwWaitEvents() => _glfw.glfwWaitEvents();
|
||||
|
||||
internal static unsafe void glfwWaitEventsTimeout(double timeout) => _glfw.glfwWaitEventsTimeout(timeout);
|
||||
|
||||
internal static unsafe void glfwPostEmptyEvent() => _glfw.glfwPostEmptyEvent();
|
||||
|
||||
internal static unsafe int glfwGetInputMode(IntPtr window, int mode) => _glfw.glfwGetInputMode(window, mode);
|
||||
|
||||
internal static unsafe void glfwSetInputMode(IntPtr window, int mode, int value) => _glfw.glfwSetInputMode(window, mode, value);
|
||||
|
||||
internal static unsafe int glfwRawMouseMotionSupported() => _glfw.glfwRawMouseMotionSupported();
|
||||
|
||||
internal static unsafe byte* glfwGetKeyName(int key, int scancode) => _glfw.glfwGetKeyName(key, scancode);
|
||||
|
||||
internal static unsafe int glfwGetKeyScancode(int key) => _glfw.glfwGetKeyScancode(key);
|
||||
|
||||
internal static unsafe KeyStatus glfwGetKey(IntPtr window, int key) => _glfw.glfwGetKey(window, key);
|
||||
|
||||
internal static unsafe int glfwGetMouseButton(IntPtr window, int button) => _glfw.glfwGetMouseButton(window, button);
|
||||
|
||||
internal static unsafe void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos) => _glfw.glfwGetCursorPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwSetCursorPos(IntPtr window, double xpos, double ypos) => _glfw.glfwSetCursorPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot) => _glfw.glfwCreateCursor(image, xhot, yhot);
|
||||
|
||||
internal static unsafe GLFWcursor* glfwCreateStandardCursor(int shape) => _glfw.glfwCreateStandardCursor(shape);
|
||||
|
||||
internal static unsafe void glfwDestroyCursor(GLFWcursor* cursor) => _glfw.glfwDestroyCursor(cursor);
|
||||
|
||||
internal static unsafe void glfwSetCursor(IntPtr window, GLFWcursor* cursor) => _glfw.glfwSetCursor(window, cursor);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, int, int, void> glfwSetKeyCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, int, int, void> callback) => _glfw.glfwSetKeyCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, uint, void> glfwSetCharCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, uint, void> callback) => _glfw.glfwSetCharCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetCharModsCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, void> callback) => _glfw.glfwSetCharModsCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, int, void> glfwSetMouseButtonCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, int, void> callback) => _glfw.glfwSetMouseButtonCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, double, double, void> glfwSetCursorPosCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, double, double, void> callback) => _glfw.glfwSetCursorPosCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetCursorEnterCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetCursorEnterCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, double, double, void> glfwSetScrollCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, double, double, void> callback) => _glfw.glfwSetScrollCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, byte**, void> glfwSetDropCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, byte**, void> callback) => _glfw.glfwSetDropCallback(window, callback);
|
||||
|
||||
internal static unsafe int glfwJoystickPresent(int jid) => _glfw.glfwJoystickPresent(jid);
|
||||
|
||||
internal static unsafe float* glfwGetJoystickAxes(int jid, int* count) => _glfw.glfwGetJoystickAxes(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickButtons(int jid, int* count) => _glfw.glfwGetJoystickButtons(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickHats(int jid, int* count) => _glfw.glfwGetJoystickHats(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickName(int jid) => _glfw.glfwGetJoystickName(jid);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickGUID(int jid) => _glfw.glfwGetJoystickGUID(jid);
|
||||
|
||||
internal static unsafe void glfwSetJoystickUserPointer(int jid, void* pointer) => _glfw.glfwSetJoystickUserPointer(jid, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetJoystickUserPointer(int jid) => _glfw.glfwGetJoystickUserPointer(jid);
|
||||
|
||||
internal static unsafe int glfwJoystickIsGamepad(int jid) => _glfw.glfwJoystickIsGamepad(jid);
|
||||
|
||||
internal static unsafe delegate*<int, int, void> glfwSetJoystickCallback(delegate*<int, int, void> callback) => _glfw.glfwSetJoystickCallback(callback);
|
||||
|
||||
internal static unsafe int glfwUpdateGamepadMappings(byte* str) => _glfw.glfwUpdateGamepadMappings(str);
|
||||
|
||||
internal static unsafe byte* glfwGetGamepadName(int jid) => _glfw.glfwGetGamepadName(jid);
|
||||
|
||||
internal static unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state) => _glfw.glfwGetGamepadState(jid, state);
|
||||
|
||||
internal static unsafe void glfwSetClipboardString(IntPtr window, byte* str) => _glfw.glfwSetClipboardString(window, str);
|
||||
|
||||
internal static unsafe byte* glfwGetClipboardString(IntPtr window) => _glfw.glfwGetClipboardString(window);
|
||||
|
||||
internal static unsafe double glfwGetTime() => _glfw.glfwGetTime();
|
||||
|
||||
internal static unsafe void glfwSetTime(double time) => _glfw.glfwSetTime(time);
|
||||
|
||||
internal static unsafe ulong* glfwGetTimerValue() => _glfw.glfwGetTimerValue();
|
||||
|
||||
internal static unsafe ulong* glfwGetTimerFrequency() => _glfw.glfwGetTimerFrequency();
|
||||
|
||||
internal static unsafe void glfwMakeContextCurrent(IntPtr window) => _glfw.glfwMakeContextCurrent(window);
|
||||
|
||||
internal static unsafe IntPtr glfwGetCurrentContext() => _glfw.glfwGetCurrentContext();
|
||||
|
||||
internal static unsafe void glfwSwapBuffers(IntPtr window) => _glfw.glfwSwapBuffers(window);
|
||||
|
||||
internal static unsafe void glfwSwapInterval(int interval) => _glfw.glfwSwapInterval(interval);
|
||||
|
||||
internal static unsafe int glfwExtensionSupported(byte* extension) => _glfw.glfwExtensionSupported(extension);
|
||||
|
||||
internal static unsafe IntPtr glfwGetProcAddress(string procname) => _glfw.glfwGetProcAddress(procname);
|
||||
|
||||
internal static unsafe int glfwVulkanSupported() => _glfw.glfwVulkanSupported();
|
||||
|
||||
internal static unsafe byte** glfwGetRequiredInstanceExtensions(uint* count) => _glfw.glfwGetRequiredInstanceExtensions(count);
|
||||
|
||||
/*
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwGetInstanceProcAddress")] internal static unsafe partial delegate*<void> glfwGetInstanceProcAddress(
|
||||
VkInstance instance,
|
||||
byte* procname);
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwGetPhysicalDevicePresentationSupport")] internal static unsafe partial int glfwGetPhysicalDevicePresentationSupport(
|
||||
VkInstance instance,
|
||||
VkPhysicalDevice device,
|
||||
uint* queuefamily);
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwCreateWindowSurface")] internal static unsafe partial VkResult glfwCreateWindowSurface(
|
||||
VkInstance instance,
|
||||
glfwWindow* window,
|
||||
VkAllocationCallbacks* _allocator,
|
||||
VkSurfaceKHR* surface);
|
||||
/**/
|
||||
|
||||
#endregion api call
|
||||
}
|
||||
}
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfwFunction.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GLFWFunction
|
||||
{
|
||||
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, IntPtr> glfwCreateCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr> glfwCreateStandardCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*, IntPtr, IntPtr, IntPtr> glfwCreateWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwDefaultWindowHints;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyWindow;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwExtensionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwFocusWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetCurrentContext;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double*, double*, void> glfwGetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> glfwGetError;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetFramebufferSize;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetGamepadName;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr, int> glfwGetGamepadState;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, float*> glfwGetJoystickAxes;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickButtons;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickGUID;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickHats;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickName;
|
||||
public delegate* unmanaged[Cdecl]<int, void*> glfwGetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetKey;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*> glfwGetKeyName;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwGetKeyScancode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetMonitorContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetMonitorName;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPhysicalSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPos;
|
||||
public delegate* unmanaged[Cdecl]<int*, IntPtr*> glfwGetMonitors;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetMonitorWorkarea;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetMouseButton;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetPrimaryMonitor;
|
||||
public delegate* unmanaged[Cdecl]<byte*, IntPtr> glfwGetProcAddress;
|
||||
public delegate* unmanaged[Cdecl]<uint*, byte**> glfwGetRequiredInstanceExtensions;
|
||||
public delegate* unmanaged[Cdecl]<double> glfwGetTime;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerFrequency;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerValue;
|
||||
public delegate* unmanaged[Cdecl]<int*, int*, int*, void> glfwGetVersion;
|
||||
public delegate* unmanaged[Cdecl]<byte**> glfwGetVersionString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetVideoMode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr*> glfwGetVideoModes;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetWindowContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetWindowFrameSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float> glfwGetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwHideWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwIconifyWindow;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwInit;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwInitHint;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickIsGamepad;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickPresent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMakeContextCurrent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMaximizeWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPollEvents;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPostEmptyEvent;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwRawMouseMotionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRequestWindowAttention;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRestoreWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, void>> glfwSetCharCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>> glfwSetCharModsCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetCursorEnterCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetCursorPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>> glfwSetDropCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, byte*, void>, delegate* unmanaged[Cdecl]<int, byte*, void>> glfwSetErrorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetFramebufferSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetGamma;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, int, void>, delegate* unmanaged[Cdecl]<int, int, void>> glfwSetJoystickCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>> glfwSetKeyCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetMonitorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>> glfwSetMouseButtonCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetScrollCallback;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwSetTime;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAspectRatio;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowCloseCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>> glfwSetWindowContentScaleCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowFocusCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, IntPtr, void> glfwSetWindowIcon;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowIconifyCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowMaximizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, int, int, int, void> glfwSetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowRefreshCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowShouldClose;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> glfwSetWindowSizeLimits;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetWindowTitle;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwShowWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwSwapBuffers;
|
||||
public delegate* unmanaged[Cdecl]<int, void> glfwSwapInterval;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwTerminate;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwUpdateGamepadMappings;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwVulkanSupported;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwWaitEvents;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwWaitEventsTimeout;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwWindowHint;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*, void> glfwWindowHintString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int> glfwWindowShouldClose;
|
||||
|
||||
}
|
||||
}}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
#ifndef GLFW_FUNCTION_TABLE_H
|
||||
#define GLFW_FUNCTION_TABLE_H
|
||||
|
||||
#include "../glfw/glfw3.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GLFWFunctionTable {
|
||||
int (*glfwInit)(void);
|
||||
void (*glfwTerminate)(void);
|
||||
void (*glfwInitHint)(int hint, int value);
|
||||
void (*glfwGetVersion)(int* major, int* minor, int* rev);
|
||||
const char* (*glfwGetVersionString)(void);
|
||||
int (*glfwGetError)(const char** description);
|
||||
void* (*glfwSetErrorCallback)(void* callback);
|
||||
GLFWmonitor** (*glfwGetMonitors)(int* count);
|
||||
GLFWmonitor* (*glfwGetPrimaryMonitor)(void);
|
||||
void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
const char* (*glfwGetMonitorName)(GLFWmonitor* monitor);
|
||||
void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer);
|
||||
void* glfwGetMonitorUserPointer(GLFWmonitor* monitor);
|
||||
void* (*glfwSetMonitorCallback)(void* callback);
|
||||
const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGamma)(GLFWmonitor* monitor, float gamma);
|
||||
const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
void (*glfwDefaultWindowHints)(void);
|
||||
void (*glfwWindowHint)(int hint, int value);
|
||||
void (*glfwWindowHintString)(int hint, const char* value);
|
||||
GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void (*glfwDestroyWindow)(GLFWwindow* window);
|
||||
int (*glfwWindowShouldClose)(GLFWwindow* window);
|
||||
void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title);
|
||||
void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images);
|
||||
void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
float (*glfwGetWindowOpacity)(GLFWwindow* window);
|
||||
void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
void (*glfwIconifyWindow)(GLFWwindow* window);
|
||||
void (*glfwRestoreWindow)(GLFWwindow* window);
|
||||
void (*glfwMaximizeWindow)(GLFWwindow* window);
|
||||
void (*glfwShowWindow)(GLFWwindow* window);
|
||||
void (*glfwHideWindow)(GLFWwindow* window);
|
||||
void (*glfwFocusWindow)(GLFWwindow* window);
|
||||
void (*glfwRequestWindowAttention)(GLFWwindow* window);
|
||||
GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window);
|
||||
void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
void* (*glfwGetWindowUserPointer)(GLFWwindow* window);
|
||||
void* (*glfwSetWindowPosCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowSizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowCloseCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowRefreshCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowFocusCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowIconifyCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, void* callback);
|
||||
void (*glfwPollEvents)(void);
|
||||
void (*glfwWaitEvents)(void);
|
||||
void (*glfwWaitEventsTimeout)(double timeout);
|
||||
void (*glfwPostEmptyEvent)(void);
|
||||
int (*glfwGetInputMode)(GLFWwindow* window, int mode);
|
||||
void (*glfwSetInputMode)(GLFWwindow* window, int mode, int value);
|
||||
int (*glfwRawMouseMotionSupported)(void);
|
||||
const char* (*glfwGetKeyName)(int key, int scancode);
|
||||
int (*glfwGetKeyScancode)(int key);
|
||||
int (*glfwGetKey)(GLFWwindow* window, int key);
|
||||
int (*glfwGetMouseButton)(GLFWwindow* window, int button);
|
||||
void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursor* (*glfwCreateCursor)(const GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (*glfwCreateStandardCursor)(int shape);
|
||||
void (*glfwDestroyCursor)(GLFWcursor* cursor);
|
||||
void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
void* (*glfwSetKeyCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCharCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCharModsCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetMouseButtonCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCursorPosCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetCursorEnterCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetScrollCallback)(GLFWwindow* window, void* callback);
|
||||
void* (*glfwSetDropCallback)(GLFWwindow* window, void* callback);
|
||||
int (*glfwJoystickPresent)(int jid);
|
||||
const float* (*glfwGetJoystickAxes)(int jid, int* count);
|
||||
const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickGUID)(int jid);
|
||||
const unsigned char* (*glfwGetJoystickHats)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickName)(int jid);
|
||||
void* (*glfwGetJoystickUserPointer)(int jid);
|
||||
int (*glfwJoystickIsGamepad)(int jid);
|
||||
void* (*glfwSetJoystickCallback)(void* callback);
|
||||
int (*glfwUpdateGamepadMappings)(const char* str);
|
||||
const char* (*glfwGetGamepadName)(int jid);
|
||||
int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
void (*glfwSetClipboardString)(GLFWwindow* window, const char* str);
|
||||
const char* (*glfwGetClipboardString)(GLFWwindow* window);
|
||||
double (*glfwGetTime)(void);
|
||||
void (*glfwSetTime)(double time);
|
||||
unsigned long long (*glfwGetTimerValue)(void);
|
||||
unsigned long long (*glfwGetTimerFrequency)(void);
|
||||
void (*glfwMakeContextCurrent)(GLFWwindow* window);
|
||||
GLFWwindow* (*glfwGetCurrentContext)(void);
|
||||
void (*glfwSwapBuffers)(GLFWwindow* window);
|
||||
void (*glfwSwapInterval)(int interval);
|
||||
int (*glfwExtensionSupported)(const char* extension);
|
||||
void* (*glfwGetProcAddress)(const char* procname);
|
||||
int (*glfwVulkanSupported)(void);
|
||||
const char** (*glfwGetRequiredInstanceExtensions)(unsigned int* count);
|
||||
} GLFWFunctionTable;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
#ifndef GLFW_FUNCTION_TABLE_H
|
||||
#define GLFW_FUNCTION_TABLE_H
|
||||
|
||||
#include "../glfw/glfw3.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GLFWFunctionTable {
|
||||
void (*glfwCreateCursor)(GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (*glfwCreateStandardCursor)(int shape);
|
||||
GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void (*glfwDefaultWindowHints)(void);
|
||||
void (*glfwDestroyCursor)(GLFWcursor* cursor);
|
||||
void (*glfwDestroyWindow)(GLFWwindow* window);
|
||||
void (*glfwFocusWindow)(GLFWwindow* window);
|
||||
const char* (*glfwGetClipboardString)(GLFWwindow* window);
|
||||
GLFWwindow* (*glfwGetCurrentContext)(void);
|
||||
void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
int (*glfwGetError)(const char** description);
|
||||
void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
const char* (*glfwGetGamepadName)(int jid);
|
||||
int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor);
|
||||
int (*glfwGetInputMode)(GLFWwindow* window, int mode);
|
||||
const float* (*glfwGetJoystickAxes)(int jid, int* count);
|
||||
const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickGUID)(int jid);
|
||||
const unsigned char* (*glfwGetJoystickHats)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickName)(int jid);
|
||||
void* (*glfwGetJoystickUserPointer)(int jid);
|
||||
int (*glfwGetKey)(GLFWwindow* window, int key);
|
||||
const char* (*glfwGetKeyName)(int key, int scancode);
|
||||
int (*glfwGetKeyScancode)(int key);
|
||||
void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
const char* (*glfwGetMonitorName)(GLFWmonitor* monitor);
|
||||
void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
GLFWmonitor** (*glfwGetMonitors)(int* count);
|
||||
void* (*glfwGetMonitorUserPointer)(GLFWmonitor* monitor);
|
||||
void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
int (*glfwGetMouseButton)(GLFWwindow* window, int button);
|
||||
GLFWmonitor* (*glfwGetPrimaryMonitor)(void);
|
||||
double (*glfwGetTime)(void);
|
||||
uint64_t (*glfwGetTimerFrequency)(void);
|
||||
uint64_t (*glfwGetTimerValue)(void);
|
||||
const char* (*glfwGetVersionString)(void);
|
||||
const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor);
|
||||
const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window);
|
||||
float (*glfwGetWindowOpacity)(GLFWwindow* window);
|
||||
void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void* (*glfwGetWindowUserPointer)(GLFWwindow* window);
|
||||
void (*glfwHideWindow)(GLFWwindow* window);
|
||||
void (*glfwIconifyWindow)(GLFWwindow* window);
|
||||
int (*glfwInit)(void);
|
||||
void (*glfwInitHint)(int hint, int value);
|
||||
void (*glfwMakeContextCurrent)(GLFWwindow* window);
|
||||
void (*glfwMaximizeWindow)(GLFWwindow* window);
|
||||
void (*glfwPollEvents)(void);
|
||||
void (*glfwPostEmptyEvent)(void);
|
||||
void (*glfwRequestWindowAttention)(GLFWwindow* window);
|
||||
int (*glfwRawMouseMotionSupported)(void);
|
||||
void (*glfwRestoreWindow)(GLFWwindow* window);
|
||||
void (*glfwSetClipboardString)(GLFWwindow* window, const char* string);
|
||||
GLFWcharfun (*glfwSetCharCallback)(GLFWwindow* window, GLFWcharfun callback);
|
||||
GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
GLFWdropfun (*glfwSetDropCallback)(GLFWwindow* window, GLFWdropfun callback);
|
||||
void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback);
|
||||
void (*glfwSetJoystickUserPointer)(int jid, void* pointer);
|
||||
GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback);
|
||||
void (*glfwSetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer);
|
||||
GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback);
|
||||
void (*glfwSetTime)(double time);
|
||||
void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images);
|
||||
GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback);
|
||||
GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback);
|
||||
void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title);
|
||||
void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
void (*glfwSwapBuffers)(GLFWwindow* window);
|
||||
void (*glfwSwapInterval)(int interval);
|
||||
void (*glfwTerminate)(void);
|
||||
int (*glfwUpdateGamepadMappings)(const char* string);
|
||||
void (*glfwWaitEvents)(void);
|
||||
void (*glfwWaitEventsTimeout)(double timeout);
|
||||
int (*glfwVulkanSupported)(void);
|
||||
int (*glfwWindowShouldClose)(GLFWwindow* window);
|
||||
} GLFWFunctionTable;
|
||||
|
||||
void LoadGLFWFunctions(GLFWFunctionTable* table);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
#ifndef GLFW_FUNCTION_TABLE_H
|
||||
#define GLFW_FUNCTION_TABLE_H
|
||||
|
||||
#include "../glfw/glfw3.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GLFWFunctionTable {
|
||||
void (*glfwCreateCursor)(GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (*glfwCreateStandardCursor)(int shape);
|
||||
GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void (*glfwDefaultWindowHints)(void);
|
||||
void (*glfwDestroyCursor)(GLFWcursor* cursor);
|
||||
void (*glfwDestroyWindow)(GLFWwindow* window);
|
||||
void (*glfwFocusWindow)(GLFWwindow* window);
|
||||
const char* (*glfwGetClipboardString)(GLFWwindow* window);
|
||||
GLFWwindow* (*glfwGetCurrentContext)(void);
|
||||
void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
int (*glfwGetError)(const char** description);
|
||||
void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
const char* (*glfwGetGamepadName)(int jid);
|
||||
int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor);
|
||||
int (*glfwGetInputMode)(GLFWwindow* window, int mode);
|
||||
const float* (*glfwGetJoystickAxes)(int jid, int* count);
|
||||
const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickGUID)(int jid);
|
||||
const unsigned char* (*glfwGetJoystickHats)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickName)(int jid);
|
||||
void* (*glfwGetJoystickUserPointer)(int jid);
|
||||
int (*glfwGetKey)(GLFWwindow* window, int key);
|
||||
const char* (*glfwGetKeyName)(int key, int scancode);
|
||||
int (*glfwGetKeyScancode)(int key);
|
||||
void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
const char* (*glfwGetMonitorName)(GLFWmonitor* monitor);
|
||||
void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
GLFWmonitor** (*glfwGetMonitors)(int* count);
|
||||
void* (*glfwGetMonitorUserPointer)(GLFWmonitor* monitor);
|
||||
void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
int (*glfwGetMouseButton)(GLFWwindow* window, int button);
|
||||
GLFWmonitor* (*glfwGetPrimaryMonitor)(void);
|
||||
double (*glfwGetTime)(void);
|
||||
uint64_t (*glfwGetTimerFrequency)(void);
|
||||
uint64_t (*glfwGetTimerValue)(void);
|
||||
const char* (*glfwGetVersionString)(void);
|
||||
const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor);
|
||||
const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window);
|
||||
float (*glfwGetWindowOpacity)(GLFWwindow* window);
|
||||
void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void* (*glfwGetWindowUserPointer)(GLFWwindow* window);
|
||||
void (*glfwHideWindow)(GLFWwindow* window);
|
||||
void (*glfwIconifyWindow)(GLFWwindow* window);
|
||||
int (*glfwInit)(void);
|
||||
void (*glfwInitHint)(int hint, int value);
|
||||
void (*glfwMakeContextCurrent)(GLFWwindow* window);
|
||||
void (*glfwMaximizeWindow)(GLFWwindow* window);
|
||||
void (*glfwPollEvents)(void);
|
||||
void (*glfwPostEmptyEvent)(void);
|
||||
void (*glfwRequestWindowAttention)(GLFWwindow* window);
|
||||
int (*glfwRawMouseMotionSupported)(void);
|
||||
void (*glfwRestoreWindow)(GLFWwindow* window);
|
||||
void (*glfwSetClipboardString)(GLFWwindow* window, const char* string);
|
||||
GLFWcharfun (*glfwSetCharCallback)(GLFWwindow* window, GLFWcharfun callback);
|
||||
GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
GLFWdropfun (*glfwSetDropCallback)(GLFWwindow* window, GLFWdropfun callback);
|
||||
void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback);
|
||||
void (*glfwSetJoystickUserPointer)(int jid, void* pointer);
|
||||
GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback);
|
||||
void (*glfwSetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer);
|
||||
GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback);
|
||||
void (*glfwSetTime)(double time);
|
||||
void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images);
|
||||
GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback);
|
||||
GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback);
|
||||
void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title);
|
||||
void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
void (*glfwSwapBuffers)(GLFWwindow* window);
|
||||
void (*glfwSwapInterval)(int interval);
|
||||
void (*glfwTerminate)(void);
|
||||
int (*glfwUpdateGamepadMappings)(const char* string);
|
||||
void (*glfwWaitEvents)(void);
|
||||
void (*glfwWaitEventsTimeout)(double timeout);
|
||||
int (*glfwVulkanSupported)(void);
|
||||
int (*glfwWindowShouldClose)(GLFWwindow* window);
|
||||
} GLFWFunctionTable;
|
||||
|
||||
void LoadGLFWFunctions(GLFWFunctionTable* table);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#include "StgSharpNative.h"
|
||||
#include "glfw_function_table.h"
|
||||
#include <string.h>
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfw_function_table.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GLFWFunction
|
||||
{
|
||||
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, IntPtr> glfwCreateCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr> glfwCreateStandardCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*, IntPtr, IntPtr, IntPtr> glfwCreateWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwDefaultWindowHints;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyWindow;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwExtensionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwFocusWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetCurrentContext;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double*, double*, void> glfwGetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> glfwGetError;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetFramebufferSize;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetGamepadName;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr, int> glfwGetGamepadState;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, float*> glfwGetJoystickAxes;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickButtons;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickGUID;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickHats;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickName;
|
||||
public delegate* unmanaged[Cdecl]<int, void*> glfwGetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetKey;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*> glfwGetKeyName;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwGetKeyScancode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetMonitorContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetMonitorName;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPhysicalSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPos;
|
||||
public delegate* unmanaged[Cdecl]<int*, IntPtr*> glfwGetMonitors;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetMonitorWorkarea;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetMouseButton;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetPrimaryMonitor;
|
||||
public delegate* unmanaged[Cdecl]<byte*, IntPtr> glfwGetProcAddress;
|
||||
public delegate* unmanaged[Cdecl]<uint*, byte**> glfwGetRequiredInstanceExtensions;
|
||||
public delegate* unmanaged[Cdecl]<double> glfwGetTime;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerFrequency;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerValue;
|
||||
public delegate* unmanaged[Cdecl]<byte*> glfwGetVersionString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetVideoMode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr*> glfwGetVideoModes;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetWindowContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetWindowFrameSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float> glfwGetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwHideWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwIconifyWindow;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwInit;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwInitHint;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickIsGamepad;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickPresent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMakeContextCurrent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMaximizeWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPollEvents;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPostEmptyEvent;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwRawMouseMotionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRequestWindowAttention;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRestoreWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, void>> glfwSetCharCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>> glfwSetCharModsCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetCursorEnterCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetCursorPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>, delegate* unmanaged [Cdecl]<IntPtr, int, byte**, void>> glfwSetDropCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetFramebufferSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetGamma;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, int, void>, delegate* unmanaged[Cdecl]<int, int, void>> glfwSetJoystickCallback;
|
||||
public delegate* unmanaged[Cdecl]<int, void*, void> glfwSetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>> glfwSetKeyCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetMonitorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>> glfwSetMouseButtonCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr,double, double, void>> glfwSetScrollCallback;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwSetTime;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAspectRatio;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowCloseCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>> glfwSetWindowContentScaleCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowFocusCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, IntPtr, void> glfwSetWindowIcon;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowIconifyCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowMaximizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, int, int, int, void> glfwSetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowRefreshCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowShouldClose;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> glfwSetWindowSizeLimits;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetWindowTitle;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwShowWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwSwapBuffers;
|
||||
public delegate* unmanaged[Cdecl]<int, void> glfwSwapInterval;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwTerminate;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwUpdateGamepadMappings;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwVulkanSupported;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwWaitEvents;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwWaitEventsTimeout;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwWindowHint;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*, void> glfwWindowHintString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int> glfwWindowShouldClose;
|
||||
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
#include "StgSharpNative.h"
|
||||
#include "glfw_function_table.h"
|
||||
#include <string.h>
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="InternalIO.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
internal static unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
internal const string SS_errorLog =
|
||||
"SS_errorlog.log";
|
||||
|
||||
internal const string NativeLibName =
|
||||
"StgSharp.C";
|
||||
|
||||
internal static Dictionary<TypeCode, uint> GLtype = [];
|
||||
|
||||
internal static readonly GCHandle ssc_logHandle =
|
||||
GCHandle.Alloc(new byte[512], GCHandleType.Pinned);
|
||||
|
||||
internal static IntPtr _nativeLibPtr = IntPtr.Zero;
|
||||
|
||||
internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1);
|
||||
|
||||
static InternalIO()
|
||||
{
|
||||
GLtype.Add(TypeCode.Single, glConst.FLOAT);
|
||||
GLtype.Add(TypeCode.Int32, glConst.INT);
|
||||
GLtype.Add(TypeCode.UInt32, glConst.UNSIGNED_INT);
|
||||
GLtype.Add(TypeCode.Int16, glConst.SHORT);
|
||||
GLtype.Add(TypeCode.UInt16, glConst.UNSIGNED_SHORT);
|
||||
GLtype.Add(TypeCode.SByte, glConst.BYTE);
|
||||
GLtype.Add(TypeCode.Byte, glConst.UNSIGNED_BYTE);
|
||||
}
|
||||
|
||||
internal static void InternalAppendLog(string log)
|
||||
{
|
||||
if (!File.Exists(SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog)) {
|
||||
logStream.WriteLine(log);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void InternalWriteLog(string logLine, LogType logType)
|
||||
{
|
||||
logSyncSemaphore.Wait();
|
||||
if (!File.Exists(SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog))
|
||||
{
|
||||
logStream.WriteLine($"{logType}\t{DateTime.Now.ToString("o")}");
|
||||
logStream.WriteLine(logLine);
|
||||
}
|
||||
_ = logSyncSemaphore.Release();
|
||||
}
|
||||
|
||||
internal static void InternalWriteLog(string beforeTime, string logLine, LogType logType)
|
||||
{
|
||||
logSyncSemaphore.Wait();
|
||||
if (!File.Exists(SS_errorLog))
|
||||
{
|
||||
FileStream stream = File.Create(SS_errorLog);
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
using (StreamWriter logStream = File.AppendText(SS_errorLog))
|
||||
{
|
||||
logStream.WriteLine(beforeTime);
|
||||
logStream.WriteLine($"{logType}\t@\t{DateTime.Now.ToString("o")}");
|
||||
logStream.WriteLine(logLine);
|
||||
}
|
||||
_ = logSyncSemaphore.Release(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
#ifndef GLFW_FUNCTION_TABLE_H
|
||||
#define GLFW_FUNCTION_TABLE_H
|
||||
|
||||
#include "../glfw/glfw3.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct GLFWFunctionTable {
|
||||
int (*glfwInit)(void);
|
||||
void (*glfwTerminate)(void);
|
||||
void (*glfwInitHint)(int hint, int value);
|
||||
void (*glfwGetVersion)(int* major, int* minor, int* rev);
|
||||
const char* (*glfwGetVersionString)(void);
|
||||
int (*glfwGetError)(const char** description);
|
||||
GLFWerrorfun (*glfwSetErrorCallback)(GLFWerrorfun callback);
|
||||
GLFWmonitor** (*glfwGetMonitors)(int* count);
|
||||
GLFWmonitor* (*glfwGetPrimaryMonitor)(void);
|
||||
void (*glfwGetMonitorPos)(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
void (*glfwGetMonitorWorkarea)(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
||||
void (*glfwGetMonitorPhysicalSize)(GLFWmonitor* monitor, int* widthMM, int* heightMM);
|
||||
void (*glfwGetMonitorContentScale)(GLFWmonitor* monitor, float* xscale, float* yscale);
|
||||
const char* (*glfwGetMonitorName)(GLFWmonitor* monitor);
|
||||
void (*glfwSetMonitorUserPointer)(GLFWmonitor* monitor, void* pointer);
|
||||
void* (*glfwGetMonitorUserPointer)(GLFWmonitor* monitor);
|
||||
GLFWmonitorfun (*glfwSetMonitorCallback)(GLFWmonitorfun callback);
|
||||
const GLFWvidmode* (*glfwGetVideoModes)(GLFWmonitor* monitor, int* count);
|
||||
const GLFWvidmode* (*glfwGetVideoMode)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGamma)(GLFWmonitor* monitor, float gamma);
|
||||
const GLFWgammaramp* (*glfwGetGammaRamp)(GLFWmonitor* monitor);
|
||||
void (*glfwSetGammaRamp)(GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
||||
void (*glfwDefaultWindowHints)(void);
|
||||
void (*glfwWindowHint)(int hint, int value);
|
||||
void (*glfwWindowHintString)(int hint, const char* value);
|
||||
GLFWwindow* (*glfwCreateWindow)(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);
|
||||
void (*glfwDestroyWindow)(GLFWwindow* window);
|
||||
int (*glfwWindowShouldClose)(GLFWwindow* window);
|
||||
void (*glfwSetWindowShouldClose)(GLFWwindow* window, int value);
|
||||
void (*glfwSetWindowTitle)(GLFWwindow* window, const char* title);
|
||||
void (*glfwSetWindowIcon)(GLFWwindow* window, int count, const GLFWimage* images);
|
||||
void (*glfwGetWindowPos)(GLFWwindow* window, int* xpos, int* ypos);
|
||||
void (*glfwSetWindowPos)(GLFWwindow* window, int xpos, int ypos);
|
||||
void (*glfwGetWindowSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwSetWindowSizeLimits)(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
||||
void (*glfwSetWindowAspectRatio)(GLFWwindow* window, int numer, int denom);
|
||||
void (*glfwSetWindowSize)(GLFWwindow* window, int width, int height);
|
||||
void (*glfwGetFramebufferSize)(GLFWwindow* window, int* width, int* height);
|
||||
void (*glfwGetWindowFrameSize)(GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
||||
void (*glfwGetWindowContentScale)(GLFWwindow* window, float* xscale, float* yscale);
|
||||
float (*glfwGetWindowOpacity)(GLFWwindow* window);
|
||||
void (*glfwSetWindowOpacity)(GLFWwindow* window, float opacity);
|
||||
void (*glfwIconifyWindow)(GLFWwindow* window);
|
||||
void (*glfwRestoreWindow)(GLFWwindow* window);
|
||||
void (*glfwMaximizeWindow)(GLFWwindow* window);
|
||||
void (*glfwShowWindow)(GLFWwindow* window);
|
||||
void (*glfwHideWindow)(GLFWwindow* window);
|
||||
void (*glfwFocusWindow)(GLFWwindow* window);
|
||||
void (*glfwRequestWindowAttention)(GLFWwindow* window);
|
||||
GLFWmonitor* (*glfwGetWindowMonitor)(GLFWwindow* window);
|
||||
void (*glfwSetWindowMonitor)(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
||||
int (*glfwGetWindowAttrib)(GLFWwindow* window, int attrib);
|
||||
void (*glfwSetWindowAttrib)(GLFWwindow* window, int attrib, int value);
|
||||
void (*glfwSetWindowUserPointer)(GLFWwindow* window, void* pointer);
|
||||
void* (*glfwGetWindowUserPointer)(GLFWwindow* window);
|
||||
GLFWwindowposfun (*glfwSetWindowPosCallback)(GLFWwindow* window, GLFWwindowposfun callback);
|
||||
GLFWwindowsizefun (*glfwSetWindowSizeCallback)(GLFWwindow* window, GLFWwindowsizefun callback);
|
||||
GLFWwindowclosefun (*glfwSetWindowCloseCallback)(GLFWwindow* window, GLFWwindowclosefun callback);
|
||||
GLFWwindowrefreshfun (*glfwSetWindowRefreshCallback)(GLFWwindow* window, GLFWwindowrefreshfun callback);
|
||||
GLFWwindowfocusfun (*glfwSetWindowFocusCallback)(GLFWwindow* window, GLFWwindowfocusfun callback);
|
||||
GLFWwindowiconifyfun (*glfwSetWindowIconifyCallback)(GLFWwindow* window, GLFWwindowiconifyfun callback);
|
||||
GLFWwindowmaximizefun (*glfwSetWindowMaximizeCallback)(GLFWwindow* window, GLFWwindowmaximizefun callback);
|
||||
GLFWframebuffersizefun (*glfwSetFramebufferSizeCallback)(GLFWwindow* window, GLFWframebuffersizefun callback);
|
||||
GLFWwindowcontentscalefun (*glfwSetWindowContentScaleCallback)(GLFWwindow* window, GLFWwindowcontentscalefun callback);
|
||||
void (*glfwPollEvents)(void);
|
||||
void (*glfwWaitEvents)(void);
|
||||
void (*glfwWaitEventsTimeout)(double timeout);
|
||||
void (*glfwPostEmptyEvent)(void);
|
||||
int (*glfwGetInputMode)(GLFWwindow* window, int mode);
|
||||
void (*glfwSetInputMode)(GLFWwindow* window, int mode, int value);
|
||||
int (*glfwRawMouseMotionSupported)(void);
|
||||
const char* (*glfwGetKeyName)(int key, int scancode);
|
||||
int (*glfwGetKeyScancode)(int key);
|
||||
int (*glfwGetKey)(GLFWwindow* window, int key);
|
||||
int (*glfwGetMouseButton)(GLFWwindow* window, int button);
|
||||
void (*glfwGetCursorPos)(GLFWwindow* window, double* xpos, double* ypos);
|
||||
void (*glfwSetCursorPos)(GLFWwindow* window, double xpos, double ypos);
|
||||
GLFWcursor* (*glfwCreateCursor)(const GLFWimage* image, int xhot, int yhot);
|
||||
GLFWcursor* (*glfwCreateStandardCursor)(int shape);
|
||||
void (*glfwDestroyCursor)(GLFWcursor* cursor);
|
||||
void (*glfwSetCursor)(GLFWwindow* window, GLFWcursor* cursor);
|
||||
GLFWkeyfun (*glfwSetKeyCallback)(GLFWwindow* window, GLFWkeyfun callback);
|
||||
GLFWcharfun (*glfwSetCharCallback)(GLFWwindow* window, GLFWcharfun callback);
|
||||
GLFWcharmodsfun (*glfwSetCharModsCallback)(GLFWwindow* window, GLFWcharmodsfun callback);
|
||||
GLFWmousebuttonfun (*glfwSetMouseButtonCallback)(GLFWwindow* window, GLFWmousebuttonfun callback);
|
||||
GLFWcursorposfun (*glfwSetCursorPosCallback)(GLFWwindow* window, GLFWcursorposfun callback);
|
||||
GLFWcursorenterfun (*glfwSetCursorEnterCallback)(GLFWwindow* window, GLFWcursorenterfun callback);
|
||||
GLFWscrollfun (*glfwSetScrollCallback)(GLFWwindow* window, GLFWscrollfun callback);
|
||||
GLFWdropfun (*glfwSetDropCallback)(GLFWwindow* window, GLFWdropfun callback);
|
||||
int (*glfwJoystickPresent)(int jid);
|
||||
const float* (*glfwGetJoystickAxes)(int jid, int* count);
|
||||
const unsigned char* (*glfwGetJoystickButtons)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickGUID)(int jid);
|
||||
const unsigned char* (*glfwGetJoystickHats)(int jid, int* count);
|
||||
const char* (*glfwGetJoystickName)(int jid);
|
||||
void* (*glfwGetJoystickUserPointer)(int jid);
|
||||
int (*glfwJoystickIsGamepad)(int jid);
|
||||
GLFWjoystickfun (*glfwSetJoystickCallback)(GLFWjoystickfun callback);
|
||||
int (*glfwUpdateGamepadMappings)(const char* str);
|
||||
const char* (*glfwGetGamepadName)(int jid);
|
||||
int (*glfwGetGamepadState)(int jid, GLFWgamepadstate* state);
|
||||
void (*glfwSetClipboardString)(GLFWwindow* window, const char* str);
|
||||
const char* (*glfwGetClipboardString)(GLFWwindow* window);
|
||||
double (*glfwGetTime)(void);
|
||||
void (*glfwSetTime)(double time);
|
||||
unsigned long long (*glfwGetTimerValue)(void);
|
||||
unsigned long long (*glfwGetTimerFrequency)(void);
|
||||
void (*glfwMakeContextCurrent)(GLFWwindow* window);
|
||||
GLFWwindow* (*glfwGetCurrentContext)(void);
|
||||
void (*glfwSwapBuffers)(GLFWwindow* window);
|
||||
void (*glfwSwapInterval)(int interval);
|
||||
int (*glfwExtensionSupported)(const char* extension);
|
||||
GLFWglproc (*glfwGetProcAddress)(const char* procname);
|
||||
int (*glfwVulkanSupported)(void);
|
||||
const char** (*glfwGetRequiredInstanceExtensions)(unsigned int* count);
|
||||
} GLFWFunctionTable;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+366
@@ -0,0 +1,366 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfw.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
internal unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
private static GLFWFunction _glfw;
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "load_glfw_functions")]
|
||||
internal static unsafe partial void glfwLoadLibrary(GLFWFunction* context);
|
||||
|
||||
internal static unsafe void LoadGlfw()
|
||||
{
|
||||
_glfw = new GLFWFunction();
|
||||
fixed (GLFWFunction* func = &_glfw) { }
|
||||
}
|
||||
|
||||
#region api call
|
||||
|
||||
internal static unsafe int glfwInit() => _glfw.glfwInit();
|
||||
|
||||
internal static unsafe void glfwTerminate() => _glfw.glfwTerminate();
|
||||
|
||||
internal static unsafe void glfwInitHint(int hint, int value) => _glfw.glfwInitHint(hint, value);
|
||||
|
||||
internal static unsafe void glfwGetVersion(int* major, int* minor, int* rev) => _glfw.glfwGetVersion(major, minor, rev);
|
||||
|
||||
internal static unsafe byte* glfwGetVersionString() => _glfw.glfwGetVersionString();
|
||||
|
||||
internal static unsafe int glfwGetError(byte** description) => _glfw.glfwGetError(description);
|
||||
|
||||
internal static unsafe delegate*<int, byte*, void> glfwSetErrorCallback(delegate*<int, byte*, void> callback) => _glfw.glfwSetErrorCallback(callback);
|
||||
|
||||
internal static unsafe IntPtr* glfwGetMonitors(int* count) => _glfw.glfwGetMonitors(count);
|
||||
|
||||
internal static unsafe IntPtr glfwGetPrimaryMonitor() => _glfw.glfwGetPrimaryMonitor();
|
||||
|
||||
internal static unsafe void glfwGetMonitorPos(IntPtr monitor, int* xpos, int* ypos) => _glfw.glfwGetMonitorPos(monitor, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwGetMonitorWorkarea(
|
||||
IntPtr monitor,
|
||||
int* xpos,
|
||||
int* ypos,
|
||||
int* width,
|
||||
int* height)
|
||||
{
|
||||
_glfw.glfwGetMonitorWorkarea(monitor, xpos, ypos, width, height);
|
||||
}
|
||||
|
||||
internal static unsafe void glfwGetMonitorPhysicalSize(IntPtr monitor, int* widthMM, int* heightMM) => _glfw.glfwGetMonitorPhysicalSize(monitor, widthMM, heightMM);
|
||||
|
||||
internal static unsafe void glfwGetMonitorContentScale(IntPtr monitor, float* xscale, float* yscale) => _glfw.glfwGetMonitorContentScale(monitor, xscale, yscale);
|
||||
|
||||
internal static unsafe byte* glfwGetMonitorName(IntPtr monitor) => _glfw.glfwGetMonitorName(monitor);
|
||||
|
||||
internal static unsafe void glfwSetMonitorUserPointer(IntPtr monitor, void* pointer) => _glfw.glfwSetMonitorUserPointer(monitor, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetMonitorUserPointer(IntPtr monitor) => _glfw.glfwGetMonitorUserPointer(monitor);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetMonitorCallback(
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetMonitorCallback(callback);
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoModes(IntPtr monitor, int* count) => _glfw.glfwGetVideoModes(monitor, count);
|
||||
|
||||
internal static unsafe glfwVideomode* glfwGetVideoMode(IntPtr monitor) => _glfw.glfwGetVideoMode(monitor);
|
||||
|
||||
internal static unsafe void glfwSetGamma(IntPtr monitor, float gamma) => _glfw.glfwSetGamma(monitor, gamma);
|
||||
|
||||
internal static unsafe glfwGammaramp* glfwGetGammaRamp(IntPtr monitor) => _glfw.glfwGetGammaRamp(monitor);
|
||||
|
||||
internal static unsafe void glfwSetGammaRamp(IntPtr monitor, glfwGammaramp* ramp) => _glfw.glfwSetGammaRamp(monitor, ramp);
|
||||
|
||||
internal static unsafe void glfwDefaultWindowHints() => _glfw.glfwDefaultWindowHints();
|
||||
|
||||
internal static unsafe void glfwWindowHint(int hint, int value) => _glfw.glfwWindowHint(hint, value);
|
||||
|
||||
internal static unsafe void glfwWindowHintString(int hint, byte* value) => _glfw.glfwWindowHintString(hint, value);
|
||||
|
||||
internal static unsafe IntPtr glfwCreateWindow(
|
||||
int width,
|
||||
int height,
|
||||
byte[] title,
|
||||
IntPtr monitor,
|
||||
IntPtr share) => _glfw.glfwCreateWindow(width, height, title, monitor, share);
|
||||
|
||||
internal static unsafe void glfwDestroyWindow(IntPtr window) => _glfw.glfwDestroyWindow(window);
|
||||
|
||||
internal static unsafe int glfwWindowShouldClose(IntPtr window) => _glfw.glfwWindowShouldClose(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowShouldClose(IntPtr window, int value) => _glfw.glfwSetWindowShouldClose(window, value);
|
||||
|
||||
internal static unsafe void glfwSetWindowTitle(IntPtr window, byte* title) => _glfw.glfwSetWindowTitle(window, title);
|
||||
|
||||
internal static unsafe void glfwSetWindowIcon(IntPtr window, int count, GLFWimage* images) => _glfw.glfwSetWindowIcon(window, count, images);
|
||||
|
||||
internal static unsafe void glfwGetWindowPos(IntPtr window, int* xpos, int* ypos) => _glfw.glfwGetWindowPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwSetWindowPos(IntPtr window, int xpos, int ypos) => _glfw.glfwSetWindowPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwGetWindowSize(IntPtr window, int* width, int* height) => _glfw.glfwGetWindowSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwSetWindowSizeLimits(
|
||||
IntPtr window,
|
||||
int minwidth,
|
||||
int minheight,
|
||||
int maxwidth,
|
||||
int maxheight) => _glfw.glfwSetWindowSizeLimits(window, minwidth, minheight, maxwidth, maxheight);
|
||||
|
||||
internal static unsafe void glfwSetWindowAspectRatio(IntPtr window, int numer, int denom) => _glfw.glfwSetWindowAspectRatio(window, numer, denom);
|
||||
|
||||
internal static unsafe void glfwSetWindowSize(IntPtr window, int width, int height) => _glfw.glfwSetWindowSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwGetFramebufferSize(IntPtr window, int* width, int* height) => _glfw.glfwGetFramebufferSize(window, width, height);
|
||||
|
||||
internal static unsafe void glfwGetWindowFrameSize(IntPtr window, int* left, int* top, int* right, int* bottom) => _glfw.glfwGetWindowFrameSize(window, left, top, right, bottom);
|
||||
|
||||
internal static unsafe void glfwGetWindowContentScale(IntPtr window, float* xscale, float* yscale) => _glfw.glfwGetWindowContentScale(window, xscale, yscale);
|
||||
|
||||
internal static unsafe float glfwGetWindowOpacity(IntPtr window) => _glfw.glfwGetWindowOpacity(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowOpacity(IntPtr window, float opacity) => _glfw.glfwSetWindowOpacity(window, opacity);
|
||||
|
||||
internal static unsafe void glfwIconifyWindow(IntPtr window) => _glfw.glfwIconifyWindow(window);
|
||||
|
||||
internal static unsafe void glfwRestoreWindow(IntPtr window) => _glfw.glfwRestoreWindow(window);
|
||||
|
||||
internal static unsafe void glfwMaximizeWindow(IntPtr window) => _glfw.glfwMaximizeWindow(window);
|
||||
|
||||
internal static unsafe void glfwShowWindow(IntPtr window) => _glfw.glfwShowWindow(window);
|
||||
|
||||
internal static unsafe void glfwHideWindow(IntPtr window) => _glfw.glfwHideWindow(window);
|
||||
|
||||
internal static unsafe void glfwFocusWindow(IntPtr window) => _glfw.glfwFocusWindow(window);
|
||||
|
||||
internal static unsafe void glfwRequestWindowAttention(IntPtr window) => _glfw.glfwRequestWindowAttention(window);
|
||||
|
||||
internal static unsafe IntPtr glfwGetWindowMonitor(IntPtr window) => _glfw.glfwGetWindowMonitor(window);
|
||||
|
||||
internal static unsafe void glfwSetWindowMonitor(
|
||||
IntPtr window,
|
||||
IntPtr monitor,
|
||||
int xpos,
|
||||
int ypos,
|
||||
int width,
|
||||
int height,
|
||||
int refreshRate) => _glfw.glfwSetWindowMonitor(
|
||||
window, monitor, xpos, ypos, width, height, refreshRate);
|
||||
|
||||
internal static unsafe int glfwGetWindowAttrib(IntPtr window, int attrib) => _glfw.glfwGetWindowAttrib(window, attrib);
|
||||
|
||||
internal static unsafe void glfwSetWindowAttrib(IntPtr window, int attrib, int value) => _glfw.glfwSetWindowAttrib(window, attrib, value);
|
||||
|
||||
internal static unsafe void glfwSetWindowUserPointer(IntPtr window, void* pointer) => _glfw.glfwSetWindowUserPointer(window, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetWindowUserPointer(IntPtr window) => _glfw.glfwGetWindowUserPointer(window);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetWindowPosCallback(
|
||||
IntPtr window,
|
||||
IntPtr callback) => _glfw.glfwSetWindowPosCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetWindowSizeCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, void> callback) => _glfw.glfwSetWindowSizeCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, void> glfwSetWindowCloseCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, void> callback) => _glfw.glfwSetWindowCloseCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, void> glfwSetWindowRefreshCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, void> callback) => _glfw.glfwSetWindowRefreshCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowFocusCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowFocusCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowIconifyCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowIconifyCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetWindowMaximizeCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetWindowMaximizeCallback(window, callback);
|
||||
|
||||
internal static unsafe FrameBufferSizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback) => _glfw.glfwSetFramebufferSizeCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, float, float> glfwSetWindowContentScaleCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, float, float> callback) => _glfw.glfwSetWindowContentScaleCallback(window, callback);
|
||||
|
||||
internal static unsafe void glfwPollEvents() => _glfw.glfwPollEvents();
|
||||
|
||||
internal static unsafe void glfwWaitEvents() => _glfw.glfwWaitEvents();
|
||||
|
||||
internal static unsafe void glfwWaitEventsTimeout(double timeout) => _glfw.glfwWaitEventsTimeout(timeout);
|
||||
|
||||
internal static unsafe void glfwPostEmptyEvent() => _glfw.glfwPostEmptyEvent();
|
||||
|
||||
internal static unsafe int glfwGetInputMode(IntPtr window, int mode) => _glfw.glfwGetInputMode(window, mode);
|
||||
|
||||
internal static unsafe void glfwSetInputMode(IntPtr window, int mode, int value) => _glfw.glfwSetInputMode(window, mode, value);
|
||||
|
||||
internal static unsafe int glfwRawMouseMotionSupported() => _glfw.glfwRawMouseMotionSupported();
|
||||
|
||||
internal static unsafe byte* glfwGetKeyName(int key, int scancode) => _glfw.glfwGetKeyName(key, scancode);
|
||||
|
||||
internal static unsafe int glfwGetKeyScancode(int key) => _glfw.glfwGetKeyScancode(key);
|
||||
|
||||
internal static unsafe KeyStatus glfwGetKey(IntPtr window, int key) => _glfw.glfwGetKey(window, key);
|
||||
|
||||
internal static unsafe int glfwGetMouseButton(IntPtr window, int button) => _glfw.glfwGetMouseButton(window, button);
|
||||
|
||||
internal static unsafe void glfwGetCursorPos(IntPtr window, double* xpos, double* ypos) => _glfw.glfwGetCursorPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe void glfwSetCursorPos(IntPtr window, double xpos, double ypos) => _glfw.glfwSetCursorPos(window, xpos, ypos);
|
||||
|
||||
internal static unsafe GLFWcursor* glfwCreateCursor(GLFWimage* image, int xhot, int yhot) => _glfw.glfwCreateCursor(image, xhot, yhot);
|
||||
|
||||
internal static unsafe GLFWcursor* glfwCreateStandardCursor(int shape) => _glfw.glfwCreateStandardCursor(shape);
|
||||
|
||||
internal static unsafe void glfwDestroyCursor(GLFWcursor* cursor) => _glfw.glfwDestroyCursor(cursor);
|
||||
|
||||
internal static unsafe void glfwSetCursor(IntPtr window, GLFWcursor* cursor) => _glfw.glfwSetCursor(window, cursor);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, int, int, void> glfwSetKeyCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, int, int, void> callback) => _glfw.glfwSetKeyCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, uint, void> glfwSetCharCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, uint, void> callback) => _glfw.glfwSetCharCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, void> glfwSetCharModsCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, void> callback) => _glfw.glfwSetCharModsCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, int, int, void> glfwSetMouseButtonCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, int, int, void> callback) => _glfw.glfwSetMouseButtonCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, double, double, void> glfwSetCursorPosCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, double, double, void> callback) => _glfw.glfwSetCursorPosCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, void> glfwSetCursorEnterCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, void> callback) => _glfw.glfwSetCursorEnterCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, double, double, void> glfwSetScrollCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, double, double, void> callback) => _glfw.glfwSetScrollCallback(window, callback);
|
||||
|
||||
internal static unsafe delegate*<glfwWindow*, int, byte**, void> glfwSetDropCallback(
|
||||
IntPtr window,
|
||||
delegate*<glfwWindow*, int, byte**, void> callback) => _glfw.glfwSetDropCallback(window, callback);
|
||||
|
||||
internal static unsafe int glfwJoystickPresent(int jid) => _glfw.glfwJoystickPresent(jid);
|
||||
|
||||
internal static unsafe float* glfwGetJoystickAxes(int jid, int* count) => _glfw.glfwGetJoystickAxes(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickButtons(int jid, int* count) => _glfw.glfwGetJoystickButtons(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickHats(int jid, int* count) => _glfw.glfwGetJoystickHats(jid, count);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickName(int jid) => _glfw.glfwGetJoystickName(jid);
|
||||
|
||||
internal static unsafe byte* glfwGetJoystickGUID(int jid) => _glfw.glfwGetJoystickGUID(jid);
|
||||
|
||||
internal static unsafe void glfwSetJoystickUserPointer(int jid, void* pointer) => _glfw.glfwSetJoystickUserPointer(jid, pointer);
|
||||
|
||||
internal static unsafe void* glfwGetJoystickUserPointer(int jid) => _glfw.glfwGetJoystickUserPointer(jid);
|
||||
|
||||
internal static unsafe int glfwJoystickIsGamepad(int jid) => _glfw.glfwJoystickIsGamepad(jid);
|
||||
|
||||
internal static unsafe delegate*<int, int, void> glfwSetJoystickCallback(delegate*<int, int, void> callback) => _glfw.glfwSetJoystickCallback(callback);
|
||||
|
||||
internal static unsafe int glfwUpdateGamepadMappings(byte* str) => _glfw.glfwUpdateGamepadMappings(str);
|
||||
|
||||
internal static unsafe byte* glfwGetGamepadName(int jid) => _glfw.glfwGetGamepadName(jid);
|
||||
|
||||
internal static unsafe int glfwGetGamepadState(int jid, GLFWgamepadstate* state) => _glfw.glfwGetGamepadState(jid, state);
|
||||
|
||||
internal static unsafe void glfwSetClipboardString(IntPtr window, byte* str) => _glfw.glfwSetClipboardString(window, str);
|
||||
|
||||
internal static unsafe byte* glfwGetClipboardString(IntPtr window) => _glfw.glfwGetClipboardString(window);
|
||||
|
||||
internal static unsafe double glfwGetTime() => _glfw.glfwGetTime();
|
||||
|
||||
internal static unsafe void glfwSetTime(double time) => _glfw.glfwSetTime(time);
|
||||
|
||||
internal static unsafe ulong* glfwGetTimerValue() => _glfw.glfwGetTimerValue();
|
||||
|
||||
internal static unsafe ulong* glfwGetTimerFrequency() => _glfw.glfwGetTimerFrequency();
|
||||
|
||||
internal static unsafe void glfwMakeContextCurrent(IntPtr window) => _glfw.glfwMakeContextCurrent(window);
|
||||
|
||||
internal static unsafe IntPtr glfwGetCurrentContext() => _glfw.glfwGetCurrentContext();
|
||||
|
||||
internal static unsafe void glfwSwapBuffers(IntPtr window) => _glfw.glfwSwapBuffers(window);
|
||||
|
||||
internal static unsafe void glfwSwapInterval(int interval) => _glfw.glfwSwapInterval(interval);
|
||||
|
||||
internal static unsafe int glfwExtensionSupported(byte* extension) => _glfw.glfwExtensionSupported(extension);
|
||||
|
||||
internal static unsafe IntPtr glfwGetProcAddress(string procname) => _glfw.glfwGetProcAddress(procname);
|
||||
|
||||
internal static unsafe int glfwVulkanSupported() => _glfw.glfwVulkanSupported();
|
||||
|
||||
internal static unsafe byte** glfwGetRequiredInstanceExtensions(uint* count) => _glfw.glfwGetRequiredInstanceExtensions(count);
|
||||
|
||||
/*
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwGetInstanceProcAddress")] internal static unsafe partial delegate*<void> glfwGetInstanceProcAddress(
|
||||
VkInstance instance,
|
||||
byte* procname);
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwGetPhysicalDevicePresentationSupport")] internal static unsafe partial int glfwGetPhysicalDevicePresentationSupport(
|
||||
VkInstance instance,
|
||||
VkPhysicalDevice device,
|
||||
uint* queuefamily);
|
||||
|
||||
[LibraryImport(NativeLibName, EntryPoint = "glfwCreateWindowSurface")] internal static unsafe partial VkResult glfwCreateWindowSurface(
|
||||
VkInstance instance,
|
||||
glfwWindow* window,
|
||||
VkAllocationCallbacks* _allocator,
|
||||
VkSurfaceKHR* surface);
|
||||
/**/
|
||||
|
||||
#endregion api call
|
||||
}
|
||||
}
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
// file="glfw_function_table.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// -----------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GLFWFunction
|
||||
{
|
||||
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, IntPtr> glfwCreateCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr> glfwCreateStandardCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*, IntPtr, IntPtr, IntPtr> glfwCreateWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwDefaultWindowHints;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyWindow;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwExtensionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwFocusWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetCurrentContext;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double*, double*, void> glfwGetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> glfwGetError;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetFramebufferSize;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetGamepadName;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr, int> glfwGetGamepadState;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, float*> glfwGetJoystickAxes;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickButtons;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickGUID;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickHats;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickName;
|
||||
public delegate* unmanaged[Cdecl]<int, void*> glfwGetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetKey;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*> glfwGetKeyName;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwGetKeyScancode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetMonitorContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetMonitorName;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPhysicalSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPos;
|
||||
public delegate* unmanaged[Cdecl]<int*, IntPtr*> glfwGetMonitors;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetMonitorWorkarea;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetMouseButton;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetPrimaryMonitor;
|
||||
public delegate* unmanaged[Cdecl]<byte*, IntPtr> glfwGetProcAddress;
|
||||
public delegate* unmanaged[Cdecl]<uint*, byte**> glfwGetRequiredInstanceExtensions;
|
||||
public delegate* unmanaged[Cdecl]<double> glfwGetTime;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerFrequency;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerValue;
|
||||
public delegate* unmanaged[Cdecl]<byte*> glfwGetVersionString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetVideoMode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr*> glfwGetVideoModes;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetWindowContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetWindowFrameSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float> glfwGetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwHideWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwIconifyWindow;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwInit;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwInitHint;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickIsGamepad;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickPresent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMakeContextCurrent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMaximizeWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPollEvents;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPostEmptyEvent;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwRawMouseMotionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRequestWindowAttention;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRestoreWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, void>> glfwSetCharCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>> glfwSetCharModsCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetCursorEnterCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetCursorPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>, delegate* unmanaged [Cdecl]<IntPtr, int, byte**, void>> glfwSetDropCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetFramebufferSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetGamma;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, int, void>, delegate* unmanaged[Cdecl]<int, int, void>> glfwSetJoystickCallback;
|
||||
public delegate* unmanaged[Cdecl]<int, void*, void> glfwSetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>> glfwSetKeyCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetMonitorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>> glfwSetMouseButtonCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr,double, double, void>> glfwSetScrollCallback;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwSetTime;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAspectRatio;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowCloseCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>> glfwSetWindowContentScaleCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowFocusCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, IntPtr, void> glfwSetWindowIcon;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowIconifyCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowMaximizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, int, int, int, void> glfwSetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowRefreshCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowShouldClose;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> glfwSetWindowSizeLimits;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetWindowTitle;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwShowWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwSwapBuffers;
|
||||
public delegate* unmanaged[Cdecl]<int, void> glfwSwapInterval;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwTerminate;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwUpdateGamepadMappings;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwVulkanSupported;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwWaitEvents;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwWaitEventsTimeout;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwWindowHint;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*, void> glfwWindowHintString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int> glfwWindowShouldClose;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user