mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Formatting of internal structs.
This commit is contained in:
parent
445bf1ea33
commit
12d17b9de6
|
@ -60,12 +60,13 @@
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Window opening hints (set by glfwOpenWindowHint)
|
// Window hints, set by glfwOpenWindowHint and consumed by glfwOpenWindow
|
||||||
// A bucket of semi-random stuff bunched together for historical reasons
|
// A bucket of semi-random stuff lumped together for historical reasons
|
||||||
// This is used only by the platform independent code and only to store
|
// This is used only by the platform independent code and only to store
|
||||||
// parameters passed to us by glfwOpenWindowHint
|
// parameters passed to us by glfwOpenWindowHint
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct {
|
typedef struct _GLFWhints
|
||||||
|
{
|
||||||
int redBits;
|
int redBits;
|
||||||
int greenBits;
|
int greenBits;
|
||||||
int blueBits;
|
int blueBits;
|
||||||
|
@ -95,7 +96,8 @@ typedef struct {
|
||||||
// This is used to pass window and context creation parameters from the
|
// This is used to pass window and context creation parameters from the
|
||||||
// platform independent code to the platform specific code
|
// platform independent code to the platform specific code
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct {
|
typedef struct _GLFWwndconfig
|
||||||
|
{
|
||||||
int mode;
|
int mode;
|
||||||
int refreshRate;
|
int refreshRate;
|
||||||
int windowNoResize;
|
int windowNoResize;
|
||||||
|
@ -114,7 +116,8 @@ typedef struct {
|
||||||
// code to the platform specific code, and also to enumerate and select
|
// code to the platform specific code, and also to enumerate and select
|
||||||
// available framebuffer configurations
|
// available framebuffer configurations
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct {
|
typedef struct _GLFWfbconfig
|
||||||
|
{
|
||||||
int redBits;
|
int redBits;
|
||||||
int greenBits;
|
int greenBits;
|
||||||
int blueBits;
|
int blueBits;
|
||||||
|
@ -135,8 +138,8 @@ typedef struct {
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Window structure
|
// Window structure
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct _GLFWwindow {
|
typedef struct _GLFWwindow
|
||||||
|
{
|
||||||
// User callback functions
|
// User callback functions
|
||||||
GLFWwindowsizefun windowSizeCallback;
|
GLFWwindowsizefun windowSizeCallback;
|
||||||
GLFWwindowclosefun windowCloseCallback;
|
GLFWwindowclosefun windowCloseCallback;
|
||||||
|
@ -147,13 +150,16 @@ typedef struct _GLFWwindow {
|
||||||
GLFWkeyfun keyCallback;
|
GLFWkeyfun keyCallback;
|
||||||
GLFWcharfun charCallback;
|
GLFWcharfun charCallback;
|
||||||
|
|
||||||
// User selected window settings
|
// Window settings and state
|
||||||
int mode;
|
GLboolean active; // GL_TRUE if this window is active
|
||||||
GLboolean sysKeysDisabled; // System keys disabled flag
|
GLboolean iconified; // GL_TRUE if this window is iconified
|
||||||
GLboolean windowNoResize; // Resize- and maximize gadgets disabled flag
|
int width, height;
|
||||||
int refreshRate; // Vertical monitor refresh rate
|
int mode; // GLFW_WINDOW or GLFW_FULLSCREEN
|
||||||
|
GLboolean sysKeysDisabled; // system keys disabled flag
|
||||||
|
GLboolean windowNoResize; // resize- and maximize gadgets disabled flag
|
||||||
|
int refreshRate; // monitor refresh rate
|
||||||
|
|
||||||
// Input
|
// Window input state
|
||||||
GLboolean stickyKeys;
|
GLboolean stickyKeys;
|
||||||
GLboolean stickyMouseButtons;
|
GLboolean stickyMouseButtons;
|
||||||
GLboolean keyRepeat;
|
GLboolean keyRepeat;
|
||||||
|
@ -163,12 +169,6 @@ typedef struct _GLFWwindow {
|
||||||
char key[GLFW_KEY_LAST + 1];
|
char key[GLFW_KEY_LAST + 1];
|
||||||
int lastChar;
|
int lastChar;
|
||||||
|
|
||||||
// Window status & parameters
|
|
||||||
GLboolean active; // Application active flag
|
|
||||||
GLboolean iconified; // Window iconified flag
|
|
||||||
int width, height; // Window width and heigth
|
|
||||||
GLboolean accelerated; // GL_TRUE if window is HW accelerated
|
|
||||||
|
|
||||||
// Framebuffer attributes
|
// Framebuffer attributes
|
||||||
int redBits;
|
int redBits;
|
||||||
int greenBits;
|
int greenBits;
|
||||||
|
@ -185,9 +185,9 @@ typedef struct _GLFWwindow {
|
||||||
int samples;
|
int samples;
|
||||||
|
|
||||||
// OpenGL extensions and context attributes
|
// OpenGL extensions and context attributes
|
||||||
|
GLboolean accelerated; // GL_TRUE if OpenGL context is "accelerated"
|
||||||
int glMajor, glMinor, glRevision;
|
int glMajor, glMinor, glRevision;
|
||||||
int glForward, glDebug, glProfile;
|
int glForward, glDebug, glProfile;
|
||||||
|
|
||||||
PFNGLGETSTRINGIPROC GetStringi;
|
PFNGLGETSTRINGIPROC GetStringi;
|
||||||
|
|
||||||
_GLFW_PLATFORM_WINDOW_STATE;
|
_GLFW_PLATFORM_WINDOW_STATE;
|
||||||
|
@ -197,7 +197,8 @@ typedef struct _GLFWwindow {
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Library global data
|
// Library global data
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct {
|
typedef struct _GLFWlibrary
|
||||||
|
{
|
||||||
_GLFWhints hints;
|
_GLFWhints hints;
|
||||||
_GLFWwindow* window;
|
_GLFWwindow* window;
|
||||||
_GLFWwindow* currentWindow;
|
_GLFWwindow* currentWindow;
|
||||||
|
@ -213,9 +214,9 @@ typedef struct {
|
||||||
|
|
||||||
// Flag indicating if GLFW has been initialized
|
// Flag indicating if GLFW has been initialized
|
||||||
#if defined(_init_c_)
|
#if defined(_init_c_)
|
||||||
int _glfwInitialized = 0;
|
GLboolean _glfwInitialized = GL_FALSE;
|
||||||
#else
|
#else
|
||||||
GLFWGLOBAL int _glfwInitialized;
|
GLFWGLOBAL GLboolean _glfwInitialized;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GLFWGLOBAL _GLFWlibrary _glfwLibrary;
|
GLFWGLOBAL _GLFWlibrary _glfwLibrary;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user