mirror of
https://github.com/glfw/glfw.git
synced 2026-08-19 07:35:54 +02:00
Added pluggable memory allocator and threading stub.
This commit is contained in:
@@ -463,6 +463,8 @@ typedef void (* GLFWmouseposfun)(GLFWwindow,int,int);
|
||||
typedef void (* GLFWscrollfun)(GLFWwindow,int,int);
|
||||
typedef void (* GLFWkeyfun)(GLFWwindow,int,int);
|
||||
typedef void (* GLFWcharfun)(GLFWwindow,int);
|
||||
typedef void* (* GLFWmallocfun)(size_t);
|
||||
typedef void (* GLFWfreefun)(void*);
|
||||
|
||||
/* The video mode structure used by glfwGetVideoModes */
|
||||
typedef struct
|
||||
@@ -482,6 +484,18 @@ typedef struct
|
||||
unsigned short blue[GLFW_GAMMA_RAMP_SIZE];
|
||||
} GLFWgammaramp;
|
||||
|
||||
/* Custom memory allocator interface */
|
||||
typedef struct
|
||||
{
|
||||
GLFWmallocfun malloc;
|
||||
GLFWfreefun free;
|
||||
} GLFWallocator;
|
||||
|
||||
/* Custom threading model interface */
|
||||
typedef struct
|
||||
{
|
||||
} GLFWthreadmodel;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Prototypes
|
||||
@@ -489,6 +503,7 @@ typedef struct
|
||||
|
||||
/* Initialization, termination and version querying */
|
||||
GLFWAPI int glfwInit(void);
|
||||
GLFWAPI int glfwInitWithModels(GLFWthreadmodel* threading, GLFWallocator* allocator);
|
||||
GLFWAPI void glfwTerminate(void);
|
||||
GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev);
|
||||
GLFWAPI const char* glfwGetVersionString(void);
|
||||
|
||||
Reference in New Issue
Block a user