glfw API Reference

*Auto-generated from module reflection*

NanoLang Mascot

Functions

extern fn glfwInit() -> int

**Returns:** int

extern fn glfwTerminate() -> void

**Returns:** void

extern fn glfwCreateWindow(_width: int, _height: int, _title: string, _monitor: GLFWmonitor, _share: GLFWwindow) -> GLFWwindow

**Parameters:**

NameType
_widthint
_heightint
_titlestring
_monitorGLFWmonitor
_shareGLFWwindow

**Returns:** GLFWwindow

extern fn glfwDestroyWindow(_window: GLFWwindow) -> void

**Parameters:**

NameType
_windowGLFWwindow

**Returns:** void

extern fn glfwWindowShouldClose(_window: GLFWwindow) -> int

**Parameters:**

NameType
_windowGLFWwindow

**Returns:** int

extern fn glfwSetWindowShouldClose(_window: GLFWwindow, _value: int) -> void

**Parameters:**

NameType
_windowGLFWwindow
_valueint

**Returns:** void

extern fn glfwSwapBuffers(_window: GLFWwindow) -> void

**Parameters:**

NameType
_windowGLFWwindow

**Returns:** void

extern fn glfwPollEvents() -> void

**Returns:** void

extern fn glfwMakeContextCurrent(_window: GLFWwindow) -> void

**Parameters:**

NameType
_windowGLFWwindow

**Returns:** void

extern fn glfwWindowHint(_hint: int, _value: int) -> void

**Parameters:**

NameType
_hintint
_valueint

**Returns:** void

extern fn glfwGetFramebufferSize(_window: GLFWwindow, _width_out: int, _height_out: int) -> void

**Parameters:**

NameType
_windowGLFWwindow
_width_outint
_height_outint

**Returns:** void

extern fn glfwSwapInterval(_interval: int) -> void

**Parameters:**

NameType
_intervalint

**Returns:** void

extern fn glfwGetKey(_window: GLFWwindow, _key: int) -> int

**Parameters:**

NameType
_windowGLFWwindow
_keyint

**Returns:** int

extern fn glfwGetMouseButton(_window: GLFWwindow, _button: int) -> int

**Parameters:**

NameType
_windowGLFWwindow
_buttonint

**Returns:** int

extern fn glfwGetCursorPos(_window: GLFWwindow, _xpos_out: int, _ypos_out: int) -> void

**Parameters:**

NameType
_windowGLFWwindow
_xpos_outint
_ypos_outint

**Returns:** void

extern fn glfwGetTime() -> float

**Returns:** float

extern fn glfwSetTime(_time: float) -> void

**Parameters:**

NameType
_timefloat

**Returns:** void

Structs

*No public structs*

Enums

*No public enums*

Unions

*No public unions*

Opaque Types

  • opaque type GLFWwindow
  • opaque type GLFWmonitor

Constants

NameTypeValue
GLFW_PRESSint1
GLFW_RELEASEint0
GLFW_REPEATint2
GLFW_KEY_SPACEint32
GLFW_KEY_MINUSint45
GLFW_KEY_EQUALint61
GLFW_KEY_1int49
GLFW_KEY_2int50
GLFW_KEY_3int51
GLFW_KEY_4int52
GLFW_KEY_5int53
GLFW_KEY_6int54
GLFW_KEY_Rint82
GLFW_KEY_ESCAPEint256
GLFW_KEY_LEFTint263
GLFW_KEY_RIGHTint262
GLFW_KEY_DOWNint264
GLFW_KEY_UPint265
GLFW_KEY_KP_SUBTRACTint333
GLFW_KEY_KP_ADDint334
GLFW_MOUSE_BUTTON_LEFTint0
GLFW_MOUSE_BUTTON_RIGHTint1
GLFW_MOUSE_BUTTON_MIDDLEint2