添加glfw,添加配置类

ink-soul 2024-04-01 10:49:43 +08:00
parent 91b3fa0a03
commit 09ce004149
370 changed files with 99196 additions and 21 deletions

View File

@ -6,6 +6,7 @@ set(NAME PlumageRender)
project(${NAME})
include_directories(external)
include_directories(external/glfw-3.4)
include_directories(external/glm)
include_directories(external/gli)
include_directories(external/imgui)

View File

@ -104,31 +104,13 @@ public:
static std::vector<const char*> args;
uint32_t selectedPhysicalDeviceIndex = 0;
bool prepared = false;
uint32_t width = 1280;
uint32_t height = 720;
float frameTimer = 1.0f;
Camera camera;
glm::vec2 mousePos;
bool paused = false;
uint32_t lastFPS = 0;
static struct Settings {
bool validation = false; // 校验层开关
bool fullscreen = false; // 全屏开关
bool vsync = false; // 垂直同步开关
bool multiSampling = true; // 多重采样
bool rotateModel = true; // 模型自旋转(暂时失效)
bool headless = false; // 无头开关
bool outputPNGimage = false; // 输出图片序列格式为PNG四通道
bool enableSaveToImageSequeue = false; // 图片序列开关(暂时弃用)
uint32_t outputFrameCount = 75; // 图片序列结束帧
bool takeScreenShot = false; // 截屏(暂时弃用)
uint32_t startFrameCount = 1; // 图片序列开始帧
uint32_t videoFrameRate = 25;
VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_4_BIT; // 多重采样倍率
} settings;
struct DepthStencil {
VkImage image;

View File

@ -0,0 +1,48 @@
# Usage:
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
set(template_path "${CMAKE_ARGV3}")
set(target_path "${CMAKE_ARGV4}")
if (NOT EXISTS "${template_path}")
message(FATAL_ERROR "Failed to find template file ${template_path}")
endif()
file(DOWNLOAD "${source_url}" "${source_path}"
STATUS download_status
TLS_VERIFY on)
list(GET download_status 0 status_code)
list(GET download_status 1 status_message)
if (status_code)
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
endif()
file(STRINGS "${source_path}" lines)
foreach(line ${lines})
if (line MATCHES "^[0-9a-fA-F]")
if (line MATCHES "platform:Windows")
if (GLFW_WIN32_MAPPINGS)
string(APPEND GLFW_WIN32_MAPPINGS "\n")
endif()
string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
elseif (line MATCHES "platform:Mac OS X")
if (GLFW_COCOA_MAPPINGS)
string(APPEND GLFW_COCOA_MAPPINGS "\n")
endif()
string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
elseif (line MATCHES "platform:Linux")
if (GLFW_LINUX_MAPPINGS)
string(APPEND GLFW_LINUX_MAPPINGS "\n")
endif()
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
endif()
endif()
endforeach()
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
file(REMOVE "${source_path}")

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,29 @@
if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"")
endif()
file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval)
if (NOT "${rm_retval}" STREQUAL 0)
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif()
elseif (IS_SYMLINK "$ENV{DESTDIR}${file}")
EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval)
if (NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"")
endif()
else()
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif()
endforeach()

View File

@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
Name: GLFW
Description: A multi-platform library for OpenGL, window and input
Version: @GLFW_VERSION@
URL: https://www.glfw.org/
Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@
Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@
Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@
Cflags: -I${includedir}

View File

@ -0,0 +1,3 @@
include(CMakeFindDependencyMacro)
find_dependency(Threads)
include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake")

View File

@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 32-bit MinGW-w64 Clang
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang")
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++")
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 32-bit MinGW-w64 GCC
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -0,0 +1,17 @@
# Find EpollShim
# Once done, this will define
#
# EPOLLSHIM_FOUND - System has EpollShim
# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim
find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
set(EPOLLSHIM_FOUND TRUE)
endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)

View File

@ -0,0 +1,18 @@
# Try to find OSMesa on a Unix system
#
# This will define:
#
# OSMESA_LIBRARIES - Link these to use OSMesa
# OSMESA_INCLUDE_DIR - Include directory for OSMesa
#
# Copyright (c) 2014 Brandon Schaefer <brandon.schaefer@canonical.com>
if (NOT WIN32)
find_package (PkgConfig)
pkg_check_modules (PKG_OSMESA QUIET osmesa)
set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS})
set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES})
endif ()

View File

@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 64-bit MinGW-w64 Clang
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang")
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++")
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -0,0 +1,13 @@
# Define the environment for cross-compiling with 64-bit MinGW-w64 GCC
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
# Configure the behaviour of the find commands
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -0,0 +1,165 @@
cmake_minimum_required(VERSION 3.4...3.28 FATAL_ERROR)
project(GLFW VERSION 3.4.0 LANGUAGES C)
if (POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" GLFW_STANDALONE)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE})
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ${GLFW_STANDALONE})
option(GLFW_BUILD_DOCS "Build the GLFW documentation" ON)
option(GLFW_INSTALL "Generate installation target" ON)
include(GNUInstallDirs)
include(CMakeDependentOption)
if (GLFW_USE_OSMESA)
message(FATAL_ERROR "GLFW_USE_OSMESA has been removed; set the GLFW_PLATFORM init hint")
endif()
if (DEFINED GLFW_USE_WAYLAND AND UNIX AND NOT APPLE)
message(FATAL_ERROR
"GLFW_USE_WAYLAND has been removed; delete the CMake cache and set GLFW_BUILD_WAYLAND and GLFW_BUILD_X11 instead")
endif()
cmake_dependent_option(GLFW_BUILD_WIN32 "Build support for Win32" ON "WIN32" OFF)
cmake_dependent_option(GLFW_BUILD_COCOA "Build support for Cocoa" ON "APPLE" OFF)
cmake_dependent_option(GLFW_BUILD_X11 "Build support for X11" ON "UNIX;NOT APPLE" OFF)
cmake_dependent_option(GLFW_BUILD_WAYLAND "Build support for Wayland" ON "UNIX;NOT APPLE" OFF)
cmake_dependent_option(GLFW_USE_HYBRID_HPG "Force use of high-performance GPU on hybrid systems" OFF
"WIN32" OFF)
cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON
"MSVC" OFF)
set(GLFW_LIBRARY_TYPE "${GLFW_LIBRARY_TYPE}" CACHE STRING
"Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)")
if (GLFW_LIBRARY_TYPE)
if (GLFW_LIBRARY_TYPE STREQUAL "SHARED")
set(GLFW_BUILD_SHARED_LIBRARY TRUE)
else()
set(GLFW_BUILD_SHARED_LIBRARY FALSE)
endif()
else()
set(GLFW_BUILD_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
endif()
list(APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules")
find_package(Threads REQUIRED)
#--------------------------------------------------------------------
# Report backend selection
#--------------------------------------------------------------------
if (GLFW_BUILD_WIN32)
message(STATUS "Including Win32 support")
endif()
if (GLFW_BUILD_COCOA)
message(STATUS "Including Cocoa support")
endif()
if (GLFW_BUILD_WAYLAND)
message(STATUS "Including Wayland support")
endif()
if (GLFW_BUILD_X11)
message(STATUS "Including X11 support")
endif()
#--------------------------------------------------------------------
# Apply Microsoft C runtime library option
# This is here because it also applies to tests and examples
#--------------------------------------------------------------------
if (MSVC AND NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
if (CMAKE_VERSION VERSION_LESS 3.15)
foreach (flag CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO)
if (flag MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
endif()
if (flag MATCHES "/MDd")
string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
endif()
endforeach()
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif()
#--------------------------------------------------------------------
# Create generated files
#--------------------------------------------------------------------
include(CMakePackageConfigHelpers)
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3")
configure_package_config_file(CMake/glfw3Config.cmake.in
src/glfw3Config.cmake
INSTALL_DESTINATION "${GLFW_CONFIG_PATH}"
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
write_basic_package_version_file(src/glfw3ConfigVersion.cmake
VERSION ${GLFW_VERSION}
COMPATIBILITY SameMajorVersion)
#--------------------------------------------------------------------
# Add subdirectories
#--------------------------------------------------------------------
add_subdirectory(src)
if (GLFW_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (GLFW_BUILD_TESTS)
add_subdirectory(tests)
endif()
if (GLFW_BUILD_DOCS)
add_subdirectory(docs)
endif()
#--------------------------------------------------------------------
# Install files other than the library
# The library is installed by src/CMakeLists.txt
#--------------------------------------------------------------------
if (GLFW_INSTALL)
install(DIRECTORY include/GLFW DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)
install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
"${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake"
DESTINATION "${GLFW_CONFIG_PATH}")
install(EXPORT glfwTargets FILE glfw3Targets.cmake
EXPORT_LINK_INTERFACE_LIBRARIES
DESTINATION "${GLFW_CONFIG_PATH}")
install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
# Only generate this target if no higher-level project already has
if (NOT TARGET uninstall)
configure_file(CMake/cmake_uninstall.cmake.in
cmake_uninstall.cmake IMMEDIATE @ONLY)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P
"${GLFW_BINARY_DIR}/cmake_uninstall.cmake")
set_target_properties(uninstall PROPERTIES FOLDER "GLFW3")
endif()
endif()

View File

@ -0,0 +1,297 @@
# Acknowledgements
GLFW exists because people around the world donated their time and lent their
skills. This list only includes contributions to the main repository and
excludes other invaluable contributions like language bindings and text and
video tutorials.
- Bobyshev Alexander
- Laurent Aphecetche
- Matt Arsenault
- Takuro Ashie
- ashishgamedev
- David Avedissian
- Luca Bacci
- Keith Bauer
- John Bartholomew
- Coşku Baş
- Bayemite
- Niklas Behrens
- Andrew Belt
- Nevyn Bengtsson
- Niklas Bergström
- Denis Bernard
- BiBi
- Doug Binks
- blanco
- Waris Boonyasiriwat
- Kyle Brenneman
- Rok Breulj
- TheBrokenRail
- Kai Burjack
- Martin Capitanio
- Nicolas Caramelli
- David Carlier
- Arturo Castro
- Chi-kwan Chan
- Victor Chernyakin
- TheChocolateOre
- Ali Chraghi
- Joseph Chua
- Ian Clarkson
- Michał Cichoń
- Lambert Clara
- Anna Clarke
- Josh Codd
- Yaron Cohen-Tal
- Omar Cornut
- Andrew Corrigan
- Bailey Cosier
- Noel Cower
- CuriouserThing
- Bill Currie
- Jason Daly
- danhambleton
- Jarrod Davis
- Olivier Delannoy
- Paul R. Deppe
- Michael Dickens
- Роман Донченко
- Mario Dorn
- Wolfgang Draxinger
- Jonathan Dummer
- Ralph Eastwood
- Fredrik Ehnbom
- Robin Eklind
- Jan Ekström
- Siavash Eliasi
- Ahmad Fatoum
- Nikita Fediuchin
- Felipe Ferreira
- Michael Fogleman
- forworldm
- Jason Francis
- Gerald Franz
- Mário Freitas
- GeO4d
- Marcus Geelnard
- Gegy
- ghuser404
- Charles Giessen
- Ryan C. Gordon
- Stephen Gowen
- Kovid Goyal
- Kevin Grandemange
- Eloi Marín Gratacós
- Grzesiek11
- Stefan Gustavson
- Andrew Gutekanst
- Stephen Gutekanst
- Jonathan Hale
- Daniel Hauser
- hdf89shfdfs
- Moritz Heinemann
- Sylvain Hellegouarch
- Björn Hempel
- Matthew Henry
- heromyth
- Lucas Hinderberger
- Paul Holden
- Hajime Hoshi
- Warren Hu
- Charles Huber
- Brent Huisman
- Florian Hülsmann
- illustris
- InKryption
- IntellectualKitty
- Aaron Jacobs
- JannikGM
- Erik S. V. Jansson
- jjYBdx4IL
- Peter Johnson
- Toni Jovanoski
- Arseny Kapoulkine
- Cem Karan
- Osman Keskin
- Koray Kilinc
- Josh Kilmer
- Byunghoon Kim
- Cameron King
- Peter Knut
- Christoph Kubisch
- Yuri Kunde Schlesner
- Rokas Kupstys
- Konstantin Käfer
- Eric Larson
- Guillaume Lebrun
- Francis Lecavalier
- Jong Won Lee
- Robin Leffmann
- Glenn Lewis
- Shane Liesegang
- Anders Lindqvist
- Leon Linhart
- Marco Lizza
- lo-v-ol
- Eyal Lotem
- Aaron Loucks
- Ned Loynd
- Luflosi
- lukect
- Tristam MacDonald
- Jean-Luc Mackail
- Hans Mackowiak
- Ramiro Magno
- Дмитри Малышев
- Zbigniew Mandziejewicz
- Adam Marcus
- Célestin Marot
- Kyle McDonald
- David V. McKay
- David Medlock
- Bryce Mehring
- Jonathan Mercier
- Marcel Metz
- Liam Middlebrook
- mightgoyardstill
- Ave Milia
- Icyllis Milica
- Jonathan Miller
- Kenneth Miller
- Bruce Mitchener
- Jack Moffitt
- Ravi Mohan
- Jeff Molofee
- Alexander Monakov
- Pierre Morel
- Jon Morton
- Pierre Moulon
- Martins Mozeiko
- Pascal Muetschard
- James Murphy
- Julian Møller
- Julius Häger
- Nat!
- NateIsStalling
- ndogxj
- F. Nedelec
- n3rdopolis
- Kristian Nielsen
- Joel Niemelä
- Victor Nova
- Kamil Nowakowski
- onox
- Denis Ovod
- Ozzy
- Andri Pálsson
- luz paz
- Peoro
- Braden Pellett
- Christopher Pelloux
- Michael Pennington
- Arturo J. Pérez
- Vladimir Perminov
- Olivier Perret
- Anthony Pesch
- Orson Peters
- Emmanuel Gil Peyrot
- Cyril Pichard
- Pilzschaf
- Keith Pitt
- Stanislav Podgorskiy
- Konstantin Podsvirov
- Nathan Poirier
- Pokechu22
- Alexandre Pretyman
- Pablo Prietz
- przemekmirek
- pthom
- Martin Pulec
- Guillaume Racicot
- Juan Ramos
- Christian Rauch
- Philip Rideout
- Eddie Ringle
- Max Risuhin
- Joe Roback
- Jorge Rodriguez
- Jari Ronkainen
- Luca Rood
- Ed Ropple
- Aleksey Rybalkin
- Mikko Rytkönen
- Riku Salminen
- Yoshinori Sano
- Brandon Schaefer
- Sebastian Schuberth
- Scr3amer
- Jan Schuerkamp
- Christian Sdunek
- Matt Sealey
- Steve Sexton
- Arkady Shapkin
- Mingjie Shen
- Ali Sherief
- Yoshiki Shibukawa
- Dmitri Shuralyov
- Joao da Silva
- Daniel Sieger
- Daljit Singh
- Michael Skec
- Daniel Skorupski
- Slemmie
- Anthony Smith
- Bradley Smith
- Cliff Smolinsky
- Patrick Snape
- Erlend Sogge Heggen
- Olivier Sohn
- Julian Squires
- Johannes Stein
- Pontus Stenetorp
- Michael Stocker
- Justin Stoecker
- Elviss Strazdins
- Paul Sultana
- Nathan Sweet
- TTK-Bandit
- Nuno Teixeira
- Jared Tiala
- Sergey Tikhomirov
- Arthur Tombs
- TronicLabs
- Ioannis Tsakpinis
- Samuli Tuomola
- Matthew Turner
- urraka
- Elias Vanderstuyft
- Stef Velzel
- Jari Vetoniemi
- Ricardo Vieira
- Nicholas Vitovitch
- Vladimír Vondruš
- Simon Voordouw
- Corentin Wallez
- Torsten Walluhn
- Patrick Walton
- Jim Wang
- Xo Wang
- Andre Weissflog
- Jay Weisskopf
- Frank Wille
- Andy Williams
- Joel Winarske
- Richard A. Wilkes
- Tatsuya Yatagawa
- Ryogo Yoshimura
- Lukas Zanner
- Andrey Zholos
- Aihui Zhu
- Santi Zupancic
- Jonas Ådahl
- Lasse Öörni
- Leonard König
- All the unmentioned and anonymous contributors in the GLFW community, for bug
reports, patches, feedback, testing and encouragement

View File

@ -0,0 +1,23 @@
Copyright (c) 2002-2006 Marcus Geelnard
Copyright (c) 2006-2019 Camilla Löwy
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would
be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

View File

@ -0,0 +1,458 @@
# GLFW
[![Build status](https://github.com/glfw/glfw/actions/workflows/build.yml/badge.svg)](https://github.com/glfw/glfw/actions)
[![Build status](https://ci.appveyor.com/api/projects/status/0kf0ct9831i5l6sp/branch/master?svg=true)](https://ci.appveyor.com/project/elmindreda/glfw)
## Introduction
GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
application development. It provides a simple, platform-independent API for
creating windows, contexts and surfaces, reading input, handling events, etc.
GLFW natively supports Windows, macOS and Linux and other Unix-like systems. On
Linux both Wayland and X11 are supported.
GLFW is licensed under the [zlib/libpng
license](https://www.glfw.org/license.html).
You can [download](https://www.glfw.org/download.html) the latest stable release
as source or Windows binaries. Each release starting with 3.0 also has
a corresponding [annotated tag](https://github.com/glfw/glfw/releases) with
source and binary archives.
The [documentation](https://www.glfw.org/docs/latest/) is available online and is
included in all source and binary archives. See the [release
notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and
deprecations in the latest release. For more details see the [version
history](https://www.glfw.org/changelog.html).
The `master` branch is the stable integration branch and _should_ always compile
and run on all supported platforms, although details of newly added features may
change until they have been included in a release. New features and many bug
fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until
they are stable enough to merge.
If you are new to GLFW, you may find the
[tutorial](https://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful. If
you have used GLFW 2 in the past, there is a [transition
guide](https://www.glfw.org/docs/latest/moving.html) for moving to the GLFW
3 API.
GLFW exists because of the contributions of [many people](CONTRIBUTORS.md)
around the world, whether by reporting bugs, providing community support, adding
features, reviewing or testing code, debugging, proofreading docs, suggesting
features or fixing bugs.
## Compiling GLFW
GLFW is written primarily in C99, with parts of macOS support being written in
Objective-C. GLFW itself requires only the headers and libraries for your OS
and window system. It does not need any additional headers for context creation
APIs (WGL, GLX, EGL, NSGL, OSMesa) or rendering APIs (OpenGL, OpenGL ES, Vulkan)
to enable support for them.
GLFW supports compilation on Windows with Visual C++ 2013 and later, MinGW and
MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
and Clang. It will likely compile in other environments as well, but this is
not regularly tested.
There are [pre-compiled binaries](https://www.glfw.org/download.html) available
for all supported compilers on Windows and macOS.
See the [compilation guide](https://www.glfw.org/docs/latest/compile.html) for
more information about how to compile GLFW yourself.
## Using GLFW
See the [documentation](https://www.glfw.org/docs/latest/) for tutorials, guides
and the API reference.
## Contributing to GLFW
See the [contribution
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
more information.
## System requirements
GLFW supports Windows XP and later and macOS 10.8 and later. Linux and other
Unix-like systems running the X Window System are supported even without
a desktop environment or modern extensions, although some features require
a running window or clipboard manager. The OSMesa backend requires Mesa 6.3.
See the [compatibility guide](https://www.glfw.org/docs/latest/compat.html)
in the documentation for more information.
## Dependencies
GLFW itself needs only CMake 3.1 or later and the headers and libraries for your
OS and window system.
The examples and test programs depend on a number of tiny libraries. These are
located in the `deps/` directory.
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
with command-line options
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
examples
- [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
functions
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
examples
- [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) for test and example UI
- [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
The documentation is generated with [Doxygen](https://doxygen.org/) if CMake can
find that tool.
## Reporting bugs
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
Please check the [contribution
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
information on what to include when reporting a bug.
## Changelog since 3.3.10
- Added `GLFW_PLATFORM` init hint for runtime platform selection (#1958)
- Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
`GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to
specify the desired platform (#1958)
- Added `glfwGetPlatform` function to query what platform was selected (#1655,#1958)
- Added `glfwPlatformSupported` function to query if a platform is supported
(#1655,#1958)
- Added `glfwInitAllocator` for setting a custom memory allocator (#544,#1628,#1947)
- Added `GLFWallocator` struct and `GLFWallocatefun`, `GLFWreallocatefun` and
`GLFWdeallocatefun` types (#544,#1628,#1947)
- Added `glfwGetWindowTitle` function for querying window title (#1448,#1909,#2482)
- Added `glfwInitVulkanLoader` for using a non-default Vulkan loader (#1374,#1890)
- Added `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR`,
`GLFW_RESIZE_ALL_CURSOR` and `GLFW_NOT_ALLOWED_CURSOR` cursor shapes (#427)
- Added `GLFW_RESIZE_EW_CURSOR` alias for `GLFW_HRESIZE_CURSOR` (#427)
- Added `GLFW_RESIZE_NS_CURSOR` alias for `GLFW_VRESIZE_CURSOR` (#427)
- Added `GLFW_POINTING_HAND_CURSOR` alias for `GLFW_HAND_CURSOR` (#427)
- Added `GLFW_MOUSE_PASSTHROUGH` window hint for letting mouse input pass
through the window (#1236,#1568)
- Added `GLFW_CURSOR_CAPTURED` cursor mode to confine the cursor to the window
content area (#58)
- Added `GLFW_POSITION_X` and `GLFW_POSITION_Y` window hints for initial position
(#1603,#1747)
- Added `GLFW_SCALE_FRAMEBUFFER` window hint for Wayland and macOS scaling (#2457)
- Added `GLFW_ANY_POSITION` hint value for letting the window manager choose (#1603,#1747)
- Added `GLFW_PLATFORM_UNAVAILABLE` error for platform detection failures (#1958)
- Added `GLFW_FEATURE_UNAVAILABLE` error for platform limitations (#1692)
- Added `GLFW_FEATURE_UNIMPLEMENTED` error for incomplete backends (#1692)
- Added `GLFW_WAYLAND_APP_ID` window hint string for Wayland app\_id selection
(#2121,#2122)
- Added `GLFW_ANGLE_PLATFORM_TYPE` init hint and `GLFW_ANGLE_PLATFORM_TYPE_*`
values to select ANGLE backend (#1380)
- Added `GLFW_X11_XCB_VULKAN_SURFACE` init hint for selecting X11 Vulkan
surface extension (#1793)
- Added `GLFW_WIN32_KEYBOARD_MENU` window hint for enabling access to the window menu
- Added `GLFW_WIN32_SHOWDEFAULT` window hint for applying the parent process
show command (#2359)
- Added `GLFW_NATIVE_INCLUDE_NONE` for disabling inclusion of native headers (#1348)
- Added `GLFW_BUILD_WIN32` CMake option for enabling Win32 support (#1958)
- Added `GLFW_BUILD_COCOA` CMake option for enabling Cocoa support (#1958)
- Added `GLFW_BUILD_X11` CMake option for enabling X11 support (#1958)
- Added `GLFW_LIBRARY_TYPE` CMake variable for overriding the library type
(#279,#1307,#1497,#1574,#1928)
- Added support for `XDG_SESSION_TYPE` environment variable
- Added `GLFW_PKG_CONFIG_REQUIRES_PRIVATE` and `GLFW_PKG_CONFIG_LIBS_PRIVATE` CMake
variables exposing pkg-config dependencies (#1307)
- Made joystick subsystem initialize at first use (#1284,#1646)
- Made `GLFW_DOUBLEBUFFER` a read-only window attribute
- Made Wayland the preferred platform over X11 if both are available (#2035)
- Updated the minimum required CMake version to 3.4
- Updated gamepad mappings from upstream
- Renamed `GLFW_USE_WAYLAND` CMake option to `GLFW_BUILD_WAYLAND` (#1958)
- Disabled tests and examples by default when built as a CMake subdirectory
- Removed `GLFW_USE_OSMESA` CMake option enabling the Null platform (#1958)
- Removed CMake generated configuration header
- Bugfix: `glfwGetVideoMode` returned an invalid mode on error (#1292)
- [Win32] Added a version info resource to the GLFW DLL
- [Win32] Made hidden helper window use its own window class
- [Win32] Bugfix: The foreground lock timeout was overridden, ignoring the user
- [Cocoa] Added `glfwGetCocoaView` native access function (#2235)
- [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
- [Cocoa] Bugfix: Touching event queue from secondary thread before main thread
would abort (#1649)
- [Wayland] Added support for `glfwRequestWindowAttention` (#2287)
- [Wayland] Added support for `glfwFocusWindow`
- [Wayland] Added support for `GLFW_RESIZABLE` (#2203)
- [Wayland] Added support for fractional scaling of window contents
- [Wayland] Added dynamic loading of all Wayland libraries
- [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled
- [Wayland] Bugfix: `GLFW_HOVERED` was true when the cursor was over any
fallback window decoration
- [Wayland] Bugfix: Fallback decorations allowed resizing to invalid size
(#2204)
- [X11] Bugfix: Termination would segfault if the IM had been destroyed
- [X11] Bugfix: Any IM started after initialization would not be detected
- [Linux] Bugfix: Joystick evdev fds remained open in forks (#2446)
- [POSIX] Removed use of deprecated function `gettimeofday`
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
- [NSGL] Removed enforcement of forward-compatible flag for core contexts
- [NSGL] Bugfix: A core profile OpenGL context was returned if 3.2+
compatibility profile was requested
- [EGL] Added platform selection via the `EGL_EXT_platform_base` extension
(#442)
- [EGL] Added ANGLE backend selection via `EGL_ANGLE_platform_angle` extension
(#1380)
## Changelog since 3.3
- Added `GLFW_WAYLAND_LIBDECOR` init hint for disabling libdecor support (#1639,#1693)
- Bugfix: The CMake config-file package used an absolute path and was not
relocatable (#1470)
- Bugfix: Video modes with a duplicate screen area were discarded (#1555,#1556)
- Bugfix: Compiling with -Wextra-semi caused warnings (#1440)
- Bugfix: Built-in mappings failed because some OEMs re-used VID/PID (#1583)
- Bugfix: Some extension loader headers did not prevent default OpenGL header
inclusion (#1695)
- Bugfix: Buffers were swapped at creation on single-buffered windows (#1873)
- Bugfix: Gamepad mapping updates could spam `GLFW_INVALID_VALUE` due to
incompatible controllers sharing hardware ID (#1763)
- Bugfix: Native access functions for context handles did not check that the API matched
- Bugfix: `glfwMakeContextCurrent` would access TLS slot before initialization
- Bugfix: `glfwSetGammaRamp` could emit `GLFW_INVALID_VALUE` before initialization
- Bugfix: `glfwGetJoystickUserPointer` returned `NULL` during disconnection (#2092)
- Bugfix: `glfwGetKeyScancode` returned `0` on error when initialized instead of `-1`
- Bugfix: Failure to make a newly created context current could cause segfault (#2327)
- [Win32] Disabled framebuffer transparency on Windows 7 when DWM windows are
opaque (#1512)
- [Win32] Bugfix: `GLFW_INCLUDE_VULKAN` plus `VK_USE_PLATFORM_WIN32_KHR` caused
symbol redefinition (#1524)
- [Win32] Bugfix: The cursor position event was emitted before its cursor enter
event (#1490)
- [Win32] Bugfix: The window hint `GLFW_MAXIMIZED` did not move or resize the
window (#1499)
- [Win32] Bugfix: Disabled cursor mode interfered with some non-client actions
- [Win32] Bugfix: Super key was not released after Win+V hotkey (#1622)
- [Win32] Bugfix: `glfwGetKeyName` could access out of bounds and return an
invalid pointer
- [Win32] Bugfix: Some synthetic key events were reported as `GLFW_KEY_UNKNOWN`
(#1623)
- [Win32] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
- [Win32] Bugfix: Monitor functions could return invalid values after
configuration change (#1761)
- [Win32] Bugfix: Initialization would segfault on Windows 8 (not 8.1) (#1775)
- [Win32] Bugfix: Duplicate size events were not filtered (#1610)
- [Win32] Bugfix: Full screen windows were incorrectly resized by DPI changes
(#1582)
- [Win32] Bugfix: `GLFW_SCALE_TO_MONITOR` had no effect on systems older than
Windows 10 version 1703 (#1511)
- [Win32] Bugfix: `USE_MSVC_RUNTIME_LIBRARY_DLL` had no effect on CMake 3.15 or
later (#1783,#1796)
- [Win32] Bugfix: Compilation with LLVM for Windows failed (#1807,#1824,#1874)
- [Win32] Bugfix: Content scale queries could fail silently (#1615)
- [Win32] Bugfix: Content scales could have garbage values if monitor was recently
disconnected (#1615)
- [Win32] Bugfix: A window created maximized and undecorated would cover the whole
monitor (#1806)
- [Win32] Bugfix: The default restored window position was lost when creating a maximized
window
- [Win32] Bugfix: `glfwMaximizeWindow` would make a hidden window visible
- [Win32] Bugfix: `Alt+PrtSc` would emit `GLFW_KEY_UNKNOWN` and a different
scancode than `PrtSc` (#1993)
- [Win32] Bugfix: `GLFW_KEY_PAUSE` scancode from `glfwGetKeyScancode` did not
match event scancode (#1993)
- [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395)
- [Win32] Bugfix: The OSMesa library was not unloaded on termination
- [Win32] Bugfix: Right shift emitted `GLFW_KEY_UNKNOWN` when using a CJK IME (#2050)
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
- [Win32] Bugfix: Fix pkg-config for dynamic library on Windows (#2386, #2420)
- [Win32] Bugfix: XInput could reportedly provide invalid DPad bit masks (#2291)
- [Win32] Bugfix: Rapid clipboard calls could fail due to Clipboard History
- [Win32] Bugfix: Disabled cursor mode doesn't work right when connected over RDP (#1276,#1279,#2431)
- [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
- [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
- [Cocoa] Changed `EGLNativeWindowType` from `NSView` to `CALayer` (#1169)
- [Cocoa] Changed F13 key to report Print Screen for cross-platform consistency
(#1786)
- [Cocoa] Disabled macOS fullscreen when `GLFW_RESIZABLE` is false
- [Cocoa] Removed dependency on the CoreVideo framework
- [Cocoa] Bugfix: `glfwSetWindowSize` used a bottom-left anchor point (#1553)
- [Cocoa] Bugfix: Window remained on screen after destruction until event poll
(#1412)
- [Cocoa] Bugfix: Event processing before window creation would assert (#1543)
- [Cocoa] Bugfix: Undecorated windows could not be iconified on recent macOS
- [Cocoa] Bugfix: Non-BMP Unicode codepoint input was reported as UTF-16
(#1635)
- [Cocoa] Bugfix: Failing to retrieve the refresh rate of built-in displays
could leak memory
- [Cocoa] Bugfix: Objective-C files were compiled as C with CMake 3.19 (#1787)
- [Cocoa] Bugfix: Duplicate video modes were not filtered out (#1830)
- [Cocoa] Bugfix: Menu bar was not clickable on macOS 10.15+ until it lost and
regained focus (#1648,#1802)
- [Cocoa] Bugfix: Monitor name query could segfault on macOS 11 (#1809,#1833)
- [Cocoa] Bugfix: The install name of the installed dylib was relative (#1504)
- [Cocoa] Bugfix: The MoltenVK layer contents scale was updated only after
related events were emitted
- [Cocoa] Bugfix: Moving the cursor programmatically would freeze it for
a fraction of a second (#1962)
- [Cocoa] Bugfix: `kIOMasterPortDefault` was deprecated in macOS 12.0 (#1980)
- [Cocoa] Bugfix: `kUTTypeURL` was deprecated in macOS 12.0 (#2003)
- [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791)
- [Cocoa] Bugfix: The EGL and OSMesa libraries were not unloaded on termination
- [Cocoa] Bugfix: `GLFW_MAXIMIZED` was always true when `GLFW_RESIZABLE` was false
- [Cocoa] Bugfix: Changing `GLFW_DECORATED` in macOS fullscreen would abort
application (#1886)
- [Cocoa] Bugfix: Setting a monitor from macOS fullscreen would abort
application (#2110)
- [Cocoa] Bugfix: The Vulkan loader was not loaded from the `Frameworks` bundle
subdirectory (#2113,#2120)
- [Cocoa] Bugfix: Compilation failed on OS X 10.8 due to unconditional use of 10.9+
symbols (#2161)
- [Cocoa] Bugfix: Querying joystick elements could reportedly segfault on macOS
13 Ventura (#2320)
- [X11] Bugfix: The CMake files did not check for the XInput headers (#1480)
- [X11] Bugfix: Key names were not updated when the keyboard layout changed
(#1462,#1528)
- [X11] Bugfix: Decorations could not be enabled after window creation (#1566)
- [X11] Bugfix: Content scale fallback value could be inconsistent (#1578)
- [X11] Bugfix: `glfwMaximizeWindow` had no effect on hidden windows
- [X11] Bugfix: Clearing `GLFW_FLOATING` on a hidden window caused invalid read
- [X11] Bugfix: Changing `GLFW_FLOATING` on a hidden window could silently fail
- [X11] Bugfix: Disabled cursor mode was interrupted by indicator windows
- [X11] Bugfix: Monitor physical dimensions could be reported as zero mm
- [X11] Bugfix: Window position events were not emitted during resizing (#1613)
- [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM
- [X11] Bugfix: Querying a disconnected monitor could segfault (#1602)
- [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636)
- [X11] Bugfix: Xlib errors caused by other parts of the application could be
reported as GLFW errors
- [X11] Bugfix: A handle race condition could cause a `BadWindow` error (#1633)
- [X11] Bugfix: XKB path used keysyms instead of physical locations for
non-printable keys (#1598)
- [X11] Bugfix: Function keys were mapped to `GLFW_KEY_UNKNOWN` for some layout
combinations (#1598)
- [X11] Bugfix: Keys pressed simultaneously with others were not always
reported (#1112,#1415,#1472,#1616)
- [X11] Bugfix: Some window attributes were not applied on leaving fullscreen
(#1863)
- [X11] Bugfix: Changing `GLFW_FLOATING` could leak memory
- [X11] Bugfix: Icon pixel format conversion worked only by accident, relying on
undefined behavior (#1986)
- [X11] Bugfix: Dynamic loading on OpenBSD failed due to soname differences
- [X11] Bugfix: Waiting for events would fail if file descriptor was too large
(#2024)
- [X11] Bugfix: Joystick events could lead to busy-waiting (#1872)
- [X11] Bugfix: `glfwWaitEvents*` did not continue for joystick events
- [X11] Bugfix: `glfwPostEmptyEvent` could be ignored due to race condition
(#379,#1281,#1285,#2033)
- [X11] Bugfix: Dynamic loading on NetBSD failed due to soname differences
- [X11] Bugfix: Left shift of int constant relied on undefined behavior (#1951)
- [X11] Bugfix: The OSMesa libray was not unloaded on termination
- [X11] Bugfix: A malformed response during selection transfer could cause a segfault
- [X11] Bugfix: Some calls would reset Xlib to the default error handler (#2108)
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
- [Wayland] Added support for key names via xkbcommon
- [Wayland] Added support for file path drop events (#2040)
- [Wayland] Added support for more human-readable monitor names where available
- [Wayland] Disabled alpha channel for opaque windows on systems lacking
`EGL_EXT_present_opaque` (#1895)
- [Wayland] Removed support for `wl_shell` (#1443)
- [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432)
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
- [Wayland] Bugfix: Retrieving partial framebuffer size would segfault
- [Wayland] Bugfix: Scrolling offsets were inverted compared to other platforms
(#1463)
- [Wayland] Bugfix: Client-Side Decorations were destroyed in the wrong order
(#1798)
- [Wayland] Bugfix: Monitors physical size could report zero (#1784,#1792)
- [Wayland] Bugfix: Some keys were not repeating in Wayland (#1908)
- [Wayland] Bugfix: Non-arrow cursors are offset from the hotspot (#1706,#1899)
- [Wayland] Bugfix: The `O_CLOEXEC` flag was not defined on FreeBSD
- [Wayland] Bugfix: Key repeat could lead to a race condition (#1710)
- [Wayland] Bugfix: Activating a window would emit two input focus events
- [Wayland] Bugfix: Disable key repeat mechanism when window loses input focus
- [Wayland] Bugfix: Window hiding and showing did not work (#1492,#1731)
- [Wayland] Bugfix: A key being repeated was not released when window lost focus
- [Wayland] Bugfix: Showing a hidden window did not emit a window refresh event
- [Wayland] Bugfix: Full screen window creation did not ignore `GLFW_VISIBLE`
- [Wayland] Bugfix: Some keys were reported as wrong key or `GLFW_KEY_UNKNOWN`
- [Wayland] Bugfix: Text input did not repeat along with key repeat
- [Wayland] Bugfix: `glfwPostEmptyEvent` sometimes had no effect (#1520,#1521)
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
`glfwGetClipboardString`
- [Wayland] Bugfix: Data source creation error would cause double free at termination
- [Wayland] Bugfix: Partial writes of clipboard string would cause beginning to repeat
- [Wayland] Bugfix: Some errors would cause clipboard string transfer to hang
- [Wayland] Bugfix: Drag and drop data was misinterpreted as clipboard string
- [Wayland] Bugfix: MIME type matching was not performed for clipboard string
- [Wayland] Bugfix: The OSMesa library was not unloaded on termination
- [Wayland] Bugfix: `glfwCreateWindow` could emit `GLFW_FEATURE_UNAVAILABLE`
- [Wayland] Bugfix: Lock key modifier bits were only set when lock keys were pressed
- [Wayland] Bugfix: A window leaving full screen mode would be iconified (#1995)
- [Wayland] Bugfix: A window leaving full screen mode ignored its desired size
- [Wayland] Bugfix: `glfwSetWindowMonitor` did not update windowed mode size
- [Wayland] Bugfix: `glfwRestoreWindow` would make a full screen window windowed
- [Wayland] Bugfix: A window maximized or restored by the user would enter an
inconsistent state
- [Wayland] Bugfix: Window maximization events were not emitted
- [Wayland] Bugfix: `glfwRestoreWindow` assumed it was always in windowed mode
- [Wayland] Bugfix: `glfwSetWindowSize` would resize a full screen window
- [Wayland] Bugfix: A window content scale event would be emitted every time
the window resized
- [Wayland] Bugfix: If `glfwInit` failed it would close stdin
- [Wayland] Bugfix: Manual resizing with fallback decorations behaved erratically
(#1991,#2115,#2127)
- [Wayland] Bugfix: Size limits included frame size for fallback decorations
- [Wayland] Bugfix: Updating `GLFW_DECORATED` had no effect on server-side
decorations
- [Wayland] Bugfix: A monitor would be reported as connected again if its scale
changed
- [Wayland] Bugfix: `glfwTerminate` would segfault if any monitor had changed
scale
- [Wayland] Bugfix: Window content scale events were not emitted when monitor
scale changed
- [Wayland] Bugfix: `glfwSetWindowAspectRatio` reported an error instead of
applying the specified ratio
- [Wayland] Bugfix: `GLFW_MAXIMIZED` window hint had no effect
- [Wayland] Bugfix: `glfwRestoreWindow` had no effect before first show
- [Wayland] Bugfix: Hiding and then showing a window caused program abort on
wlroots compositors (#1268)
- [Wayland] Bugfix: `GLFW_DECORATED` was ignored when showing a window with XDG
decorations
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
- [Wayland] Bugfix: Joysticks connected after `glfwInit` were not detected (#2198)
- [Wayland] Bugfix: Fallback decorations emitted `GLFW_CURSOR_UNAVAILABLE` errors
- [Linux] Bugfix: Joysticks without buttons were ignored (#2042,#2043)
- [Linux] Bugfix: A small amount of memory could leak if initialization failed (#2229)
- [NSGL] Bugfix: `GLFW_COCOA_RETINA_FRAMEBUFFER` had no effect on newer
macOS versions (#1442)
- [NSGL] Bugfix: Workaround for swap interval on 10.14 broke on 10.12 (#1483)
- [NSGL] Bugfix: Defining `GL_SILENCE_DEPRECATION` externally caused
a duplicate definition warning (#1840)
- [EGL] Added loading of glvnd `libOpenGL.so.0` where available for OpenGL
- [EGL] Bugfix: The `GLFW_DOUBLEBUFFER` context attribute was ignored (#1843)
- [EGL] Bugfix: Setting `GLFW_CONTEXT_DEBUG` caused creation to fail (#2348)
- [GLX] Added loading of glvnd `libGLX.so.0` where available
- [GLX] Bugfix: Context creation failed if GLX 1.4 was not exported by GLX library
## Contact
On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as
well as news, documentation and other information about the project.
If you have questions related to the use of GLFW, we have a
[forum](https://discourse.glfw.org/).
If you have a bug to report, a patch to submit or a feature you'd like to
request, please file it in the
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
Finally, if you're interested in helping out with the development of GLFW or
porting it to your favorite platform, join us on the forum or GitHub.

View File

@ -0,0 +1,230 @@
/* Copyright (c) 2012, Kim Gräsman
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of Kim Gräsman nor the names of contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "getopt.h"
#include <stddef.h>
#include <string.h>
const int no_argument = 0;
const int required_argument = 1;
const int optional_argument = 2;
char* optarg;
int optopt;
/* The variable optind [...] shall be initialized to 1 by the system. */
int optind = 1;
int opterr;
static char* optcursor = NULL;
/* Implemented based on [1] and [2] for optional arguments.
optopt is handled FreeBSD-style, per [3].
Other GNU and FreeBSD extensions are purely accidental.
[1] http://pubs.opengroup.org/onlinepubs/000095399/functions/getopt.html
[2] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
[3] http://www.freebsd.org/cgi/man.cgi?query=getopt&sektion=3&manpath=FreeBSD+9.0-RELEASE
*/
int getopt(int argc, char* const argv[], const char* optstring) {
int optchar = -1;
const char* optdecl = NULL;
optarg = NULL;
opterr = 0;
optopt = 0;
/* Unspecified, but we need it to avoid overrunning the argv bounds. */
if (optind >= argc)
goto no_more_optchars;
/* If, when getopt() is called argv[optind] is a null pointer, getopt()
shall return -1 without changing optind. */
if (argv[optind] == NULL)
goto no_more_optchars;
/* If, when getopt() is called *argv[optind] is not the character '-',
getopt() shall return -1 without changing optind. */
if (*argv[optind] != '-')
goto no_more_optchars;
/* If, when getopt() is called argv[optind] points to the string "-",
getopt() shall return -1 without changing optind. */
if (strcmp(argv[optind], "-") == 0)
goto no_more_optchars;
/* If, when getopt() is called argv[optind] points to the string "--",
getopt() shall return -1 after incrementing optind. */
if (strcmp(argv[optind], "--") == 0) {
++optind;
goto no_more_optchars;
}
if (optcursor == NULL || *optcursor == '\0')
optcursor = argv[optind] + 1;
optchar = *optcursor;
/* FreeBSD: The variable optopt saves the last known option character
returned by getopt(). */
optopt = optchar;
/* The getopt() function shall return the next option character (if one is
found) from argv that matches a character in optstring, if there is
one that matches. */
optdecl = strchr(optstring, optchar);
if (optdecl) {
/* [I]f a character is followed by a colon, the option takes an
argument. */
if (optdecl[1] == ':') {
optarg = ++optcursor;
if (*optarg == '\0') {
/* GNU extension: Two colons mean an option takes an
optional arg; if there is text in the current argv-element
(i.e., in the same word as the option name itself, for example,
"-oarg"), then it is returned in optarg, otherwise optarg is set
to zero. */
if (optdecl[2] != ':') {
/* If the option was the last character in the string pointed to by
an element of argv, then optarg shall contain the next element
of argv, and optind shall be incremented by 2. If the resulting
value of optind is greater than argc, this indicates a missing
option-argument, and getopt() shall return an error indication.
Otherwise, optarg shall point to the string following the
option character in that element of argv, and optind shall be
incremented by 1.
*/
if (++optind < argc) {
optarg = argv[optind];
} else {
/* If it detects a missing option-argument, it shall return the
colon character ( ':' ) if the first character of optstring
was a colon, or a question-mark character ( '?' ) otherwise.
*/
optarg = NULL;
optchar = (optstring[0] == ':') ? ':' : '?';
}
} else {
optarg = NULL;
}
}
optcursor = NULL;
}
} else {
/* If getopt() encounters an option character that is not contained in
optstring, it shall return the question-mark ( '?' ) character. */
optchar = '?';
}
if (optcursor == NULL || *++optcursor == '\0')
++optind;
return optchar;
no_more_optchars:
optcursor = NULL;
return -1;
}
/* Implementation based on [1].
[1] http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html
*/
int getopt_long(int argc, char* const argv[], const char* optstring,
const struct option* longopts, int* longindex) {
const struct option* o = longopts;
const struct option* match = NULL;
int num_matches = 0;
size_t argument_name_length = 0;
const char* current_argument = NULL;
int retval = -1;
optarg = NULL;
optopt = 0;
if (optind >= argc)
return -1;
if (strlen(argv[optind]) < 3 || strncmp(argv[optind], "--", 2) != 0)
return getopt(argc, argv, optstring);
/* It's an option; starts with -- and is longer than two chars. */
current_argument = argv[optind] + 2;
argument_name_length = strcspn(current_argument, "=");
for (; o->name; ++o) {
if (strncmp(o->name, current_argument, argument_name_length) == 0) {
match = o;
++num_matches;
}
}
if (num_matches == 1) {
/* If longindex is not NULL, it points to a variable which is set to the
index of the long option relative to longopts. */
if (longindex)
*longindex = (int) (match - longopts);
/* If flag is NULL, then getopt_long() shall return val.
Otherwise, getopt_long() returns 0, and flag shall point to a variable
which shall be set to val if the option is found, but left unchanged if
the option is not found. */
if (match->flag)
*(match->flag) = match->val;
retval = match->flag ? 0 : match->val;
if (match->has_arg != no_argument) {
optarg = strchr(argv[optind], '=');
if (optarg != NULL)
++optarg;
if (match->has_arg == required_argument) {
/* Only scan the next argv for required arguments. Behavior is not
specified, but has been observed with Ubuntu and Mac OSX. */
if (optarg == NULL && ++optind < argc) {
optarg = argv[optind];
}
if (optarg == NULL)
retval = ':';
}
} else if (strchr(argv[optind], '=')) {
/* An argument was provided to a non-argument option.
I haven't seen this specified explicitly, but both GNU and BSD-based
implementations show this behavior.
*/
retval = '?';
}
} else {
/* Unknown option or ambiguous match. */
retval = '?';
}
++optind;
return retval;
}

View File

@ -0,0 +1,57 @@
/* Copyright (c) 2012, Kim Gräsman
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of Kim Gräsman nor the names of contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef INCLUDED_GETOPT_PORT_H
#define INCLUDED_GETOPT_PORT_H
#if defined(__cplusplus)
extern "C" {
#endif
extern const int no_argument;
extern const int required_argument;
extern const int optional_argument;
extern char* optarg;
extern int optind, opterr, optopt;
struct option {
const char* name;
int has_arg;
int* flag;
int val;
};
int getopt(int argc, char* const argv[], const char* optstring);
int getopt_long(int argc, char* const argv[],
const char* optstring, const struct option* longopts, int* longindex);
#if defined(__cplusplus)
}
#endif
#endif // INCLUDED_GETOPT_PORT_H

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,606 @@
#ifndef LINMATH_H
#define LINMATH_H
#include <string.h>
#include <math.h>
#include <string.h>
/* 2021-03-21 Camilla Löwy <elmindreda@elmindreda.org>
* - Replaced double constants with float equivalents
*/
#ifdef LINMATH_NO_INLINE
#define LINMATH_H_FUNC static
#else
#define LINMATH_H_FUNC static inline
#endif
#define LINMATH_H_DEFINE_VEC(n) \
typedef float vec##n[n]; \
LINMATH_H_FUNC void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = a[i] + b[i]; \
} \
LINMATH_H_FUNC void vec##n##_sub(vec##n r, vec##n const a, vec##n const b) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = a[i] - b[i]; \
} \
LINMATH_H_FUNC void vec##n##_scale(vec##n r, vec##n const v, float const s) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = v[i] * s; \
} \
LINMATH_H_FUNC float vec##n##_mul_inner(vec##n const a, vec##n const b) \
{ \
float p = 0.f; \
int i; \
for(i=0; i<n; ++i) \
p += b[i]*a[i]; \
return p; \
} \
LINMATH_H_FUNC float vec##n##_len(vec##n const v) \
{ \
return sqrtf(vec##n##_mul_inner(v,v)); \
} \
LINMATH_H_FUNC void vec##n##_norm(vec##n r, vec##n const v) \
{ \
float k = 1.f / vec##n##_len(v); \
vec##n##_scale(r, v, k); \
} \
LINMATH_H_FUNC void vec##n##_min(vec##n r, vec##n const a, vec##n const b) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = a[i]<b[i] ? a[i] : b[i]; \
} \
LINMATH_H_FUNC void vec##n##_max(vec##n r, vec##n const a, vec##n const b) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = a[i]>b[i] ? a[i] : b[i]; \
} \
LINMATH_H_FUNC void vec##n##_dup(vec##n r, vec##n const src) \
{ \
int i; \
for(i=0; i<n; ++i) \
r[i] = src[i]; \
}
LINMATH_H_DEFINE_VEC(2)
LINMATH_H_DEFINE_VEC(3)
LINMATH_H_DEFINE_VEC(4)
LINMATH_H_FUNC void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b)
{
r[0] = a[1]*b[2] - a[2]*b[1];
r[1] = a[2]*b[0] - a[0]*b[2];
r[2] = a[0]*b[1] - a[1]*b[0];
}
LINMATH_H_FUNC void vec3_reflect(vec3 r, vec3 const v, vec3 const n)
{
float p = 2.f * vec3_mul_inner(v, n);
int i;
for(i=0;i<3;++i)
r[i] = v[i] - p*n[i];
}
LINMATH_H_FUNC void vec4_mul_cross(vec4 r, vec4 const a, vec4 const b)
{
r[0] = a[1]*b[2] - a[2]*b[1];
r[1] = a[2]*b[0] - a[0]*b[2];
r[2] = a[0]*b[1] - a[1]*b[0];
r[3] = 1.f;
}
LINMATH_H_FUNC void vec4_reflect(vec4 r, vec4 const v, vec4 const n)
{
float p = 2.f*vec4_mul_inner(v, n);
int i;
for(i=0;i<4;++i)
r[i] = v[i] - p*n[i];
}
typedef vec4 mat4x4[4];
LINMATH_H_FUNC void mat4x4_identity(mat4x4 M)
{
int i, j;
for(i=0; i<4; ++i)
for(j=0; j<4; ++j)
M[i][j] = i==j ? 1.f : 0.f;
}
LINMATH_H_FUNC void mat4x4_dup(mat4x4 M, mat4x4 const N)
{
int i;
for(i=0; i<4; ++i)
vec4_dup(M[i], N[i]);
}
LINMATH_H_FUNC void mat4x4_row(vec4 r, mat4x4 const M, int i)
{
int k;
for(k=0; k<4; ++k)
r[k] = M[k][i];
}
LINMATH_H_FUNC void mat4x4_col(vec4 r, mat4x4 const M, int i)
{
int k;
for(k=0; k<4; ++k)
r[k] = M[i][k];
}
LINMATH_H_FUNC void mat4x4_transpose(mat4x4 M, mat4x4 const N)
{
// Note: if M and N are the same, the user has to
// explicitly make a copy of M and set it to N.
int i, j;
for(j=0; j<4; ++j)
for(i=0; i<4; ++i)
M[i][j] = N[j][i];
}
LINMATH_H_FUNC void mat4x4_add(mat4x4 M, mat4x4 const a, mat4x4 const b)
{
int i;
for(i=0; i<4; ++i)
vec4_add(M[i], a[i], b[i]);
}
LINMATH_H_FUNC void mat4x4_sub(mat4x4 M, mat4x4 const a, mat4x4 const b)
{
int i;
for(i=0; i<4; ++i)
vec4_sub(M[i], a[i], b[i]);
}
LINMATH_H_FUNC void mat4x4_scale(mat4x4 M, mat4x4 const a, float k)
{
int i;
for(i=0; i<4; ++i)
vec4_scale(M[i], a[i], k);
}
LINMATH_H_FUNC void mat4x4_scale_aniso(mat4x4 M, mat4x4 const a, float x, float y, float z)
{
vec4_scale(M[0], a[0], x);
vec4_scale(M[1], a[1], y);
vec4_scale(M[2], a[2], z);
vec4_dup(M[3], a[3]);
}
LINMATH_H_FUNC void mat4x4_mul(mat4x4 M, mat4x4 const a, mat4x4 const b)
{
mat4x4 temp;
int k, r, c;
for(c=0; c<4; ++c) for(r=0; r<4; ++r) {
temp[c][r] = 0.f;
for(k=0; k<4; ++k)
temp[c][r] += a[k][r] * b[c][k];
}
mat4x4_dup(M, temp);
}
LINMATH_H_FUNC void mat4x4_mul_vec4(vec4 r, mat4x4 const M, vec4 const v)
{
int i, j;
for(j=0; j<4; ++j) {
r[j] = 0.f;
for(i=0; i<4; ++i)
r[j] += M[i][j] * v[i];
}
}
LINMATH_H_FUNC void mat4x4_translate(mat4x4 T, float x, float y, float z)
{
mat4x4_identity(T);
T[3][0] = x;
T[3][1] = y;
T[3][2] = z;
}
LINMATH_H_FUNC void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z)
{
vec4 t = {x, y, z, 0};
vec4 r;
int i;
for (i = 0; i < 4; ++i) {
mat4x4_row(r, M, i);
M[3][i] += vec4_mul_inner(r, t);
}
}
LINMATH_H_FUNC void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 const a, vec3 const b)
{
int i, j;
for(i=0; i<4; ++i) for(j=0; j<4; ++j)
M[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f;
}
LINMATH_H_FUNC void mat4x4_rotate(mat4x4 R, mat4x4 const M, float x, float y, float z, float angle)
{
float s = sinf(angle);
float c = cosf(angle);
vec3 u = {x, y, z};
if(vec3_len(u) > 1e-4) {
vec3_norm(u, u);
mat4x4 T;
mat4x4_from_vec3_mul_outer(T, u, u);
mat4x4 S = {
{ 0, u[2], -u[1], 0},
{-u[2], 0, u[0], 0},
{ u[1], -u[0], 0, 0},
{ 0, 0, 0, 0}
};
mat4x4_scale(S, S, s);
mat4x4 C;
mat4x4_identity(C);
mat4x4_sub(C, C, T);
mat4x4_scale(C, C, c);
mat4x4_add(T, T, C);
mat4x4_add(T, T, S);
T[3][3] = 1.f;
mat4x4_mul(R, M, T);
} else {
mat4x4_dup(R, M);
}
}
LINMATH_H_FUNC void mat4x4_rotate_X(mat4x4 Q, mat4x4 const M, float angle)
{
float s = sinf(angle);
float c = cosf(angle);
mat4x4 R = {
{1.f, 0.f, 0.f, 0.f},
{0.f, c, s, 0.f},
{0.f, -s, c, 0.f},
{0.f, 0.f, 0.f, 1.f}
};
mat4x4_mul(Q, M, R);
}
LINMATH_H_FUNC void mat4x4_rotate_Y(mat4x4 Q, mat4x4 const M, float angle)
{
float s = sinf(angle);
float c = cosf(angle);
mat4x4 R = {
{ c, 0.f, -s, 0.f},
{ 0.f, 1.f, 0.f, 0.f},
{ s, 0.f, c, 0.f},
{ 0.f, 0.f, 0.f, 1.f}
};
mat4x4_mul(Q, M, R);
}
LINMATH_H_FUNC void mat4x4_rotate_Z(mat4x4 Q, mat4x4 const M, float angle)
{
float s = sinf(angle);
float c = cosf(angle);
mat4x4 R = {
{ c, s, 0.f, 0.f},
{ -s, c, 0.f, 0.f},
{ 0.f, 0.f, 1.f, 0.f},
{ 0.f, 0.f, 0.f, 1.f}
};
mat4x4_mul(Q, M, R);
}
LINMATH_H_FUNC void mat4x4_invert(mat4x4 T, mat4x4 const M)
{
float s[6];
float c[6];
s[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1];
s[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2];
s[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3];
s[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2];
s[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3];
s[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3];
c[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1];
c[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2];
c[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3];
c[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2];
c[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3];
c[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3];
/* Assumes it is invertible */
float idet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] );
T[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet;
T[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet;
T[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet;
T[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet;
T[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet;
T[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet;
T[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet;
T[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet;
T[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet;
T[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet;
T[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet;
T[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet;
T[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet;
T[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet;
T[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet;
T[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet;
}
LINMATH_H_FUNC void mat4x4_orthonormalize(mat4x4 R, mat4x4 const M)
{
mat4x4_dup(R, M);
float s = 1.f;
vec3 h;
vec3_norm(R[2], R[2]);
s = vec3_mul_inner(R[1], R[2]);
vec3_scale(h, R[2], s);
vec3_sub(R[1], R[1], h);
vec3_norm(R[1], R[1]);
s = vec3_mul_inner(R[0], R[2]);
vec3_scale(h, R[2], s);
vec3_sub(R[0], R[0], h);
s = vec3_mul_inner(R[0], R[1]);
vec3_scale(h, R[1], s);
vec3_sub(R[0], R[0], h);
vec3_norm(R[0], R[0]);
}
LINMATH_H_FUNC void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f)
{
M[0][0] = 2.f*n/(r-l);
M[0][1] = M[0][2] = M[0][3] = 0.f;
M[1][1] = 2.f*n/(t-b);
M[1][0] = M[1][2] = M[1][3] = 0.f;
M[2][0] = (r+l)/(r-l);
M[2][1] = (t+b)/(t-b);
M[2][2] = -(f+n)/(f-n);
M[2][3] = -1.f;
M[3][2] = -2.f*(f*n)/(f-n);
M[3][0] = M[3][1] = M[3][3] = 0.f;
}
LINMATH_H_FUNC void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f)
{
M[0][0] = 2.f/(r-l);
M[0][1] = M[0][2] = M[0][3] = 0.f;
M[1][1] = 2.f/(t-b);
M[1][0] = M[1][2] = M[1][3] = 0.f;
M[2][2] = -2.f/(f-n);
M[2][0] = M[2][1] = M[2][3] = 0.f;
M[3][0] = -(r+l)/(r-l);
M[3][1] = -(t+b)/(t-b);
M[3][2] = -(f+n)/(f-n);
M[3][3] = 1.f;
}
LINMATH_H_FUNC void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f)
{
/* NOTE: Degrees are an unhandy unit to work with.
* linmath.h uses radians for everything! */
float const a = 1.f / tanf(y_fov / 2.f);
m[0][0] = a / aspect;
m[0][1] = 0.f;
m[0][2] = 0.f;
m[0][3] = 0.f;
m[1][0] = 0.f;
m[1][1] = a;
m[1][2] = 0.f;
m[1][3] = 0.f;
m[2][0] = 0.f;
m[2][1] = 0.f;
m[2][2] = -((f + n) / (f - n));
m[2][3] = -1.f;
m[3][0] = 0.f;
m[3][1] = 0.f;
m[3][2] = -((2.f * f * n) / (f - n));
m[3][3] = 0.f;
}
LINMATH_H_FUNC void mat4x4_look_at(mat4x4 m, vec3 const eye, vec3 const center, vec3 const up)
{
/* Adapted from Android's OpenGL Matrix.java. */
/* See the OpenGL GLUT documentation for gluLookAt for a description */
/* of the algorithm. We implement it in a straightforward way: */
/* TODO: The negation of of can be spared by swapping the order of
* operands in the following cross products in the right way. */
vec3 f;
vec3_sub(f, center, eye);
vec3_norm(f, f);
vec3 s;
vec3_mul_cross(s, f, up);
vec3_norm(s, s);
vec3 t;
vec3_mul_cross(t, s, f);
m[0][0] = s[0];
m[0][1] = t[0];
m[0][2] = -f[0];
m[0][3] = 0.f;
m[1][0] = s[1];
m[1][1] = t[1];
m[1][2] = -f[1];
m[1][3] = 0.f;
m[2][0] = s[2];
m[2][1] = t[2];
m[2][2] = -f[2];
m[2][3] = 0.f;
m[3][0] = 0.f;
m[3][1] = 0.f;
m[3][2] = 0.f;
m[3][3] = 1.f;
mat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]);
}
typedef float quat[4];
#define quat_add vec4_add
#define quat_sub vec4_sub
#define quat_norm vec4_norm
#define quat_scale vec4_scale
#define quat_mul_inner vec4_mul_inner
LINMATH_H_FUNC void quat_identity(quat q)
{
q[0] = q[1] = q[2] = 0.f;
q[3] = 1.f;
}
LINMATH_H_FUNC void quat_mul(quat r, quat const p, quat const q)
{
vec3 w;
vec3_mul_cross(r, p, q);
vec3_scale(w, p, q[3]);
vec3_add(r, r, w);
vec3_scale(w, q, p[3]);
vec3_add(r, r, w);
r[3] = p[3]*q[3] - vec3_mul_inner(p, q);
}
LINMATH_H_FUNC void quat_conj(quat r, quat const q)
{
int i;
for(i=0; i<3; ++i)
r[i] = -q[i];
r[3] = q[3];
}
LINMATH_H_FUNC void quat_rotate(quat r, float angle, vec3 const axis) {
vec3 axis_norm;
vec3_norm(axis_norm, axis);
float s = sinf(angle / 2);
float c = cosf(angle / 2);
vec3_scale(r, axis_norm, s);
r[3] = c;
}
LINMATH_H_FUNC void quat_mul_vec3(vec3 r, quat const q, vec3 const v)
{
/*
* Method by Fabian 'ryg' Giessen (of Farbrausch)
t = 2 * cross(q.xyz, v)
v' = v + q.w * t + cross(q.xyz, t)
*/
vec3 t;
vec3 q_xyz = {q[0], q[1], q[2]};
vec3 u = {q[0], q[1], q[2]};
vec3_mul_cross(t, q_xyz, v);
vec3_scale(t, t, 2);
vec3_mul_cross(u, q_xyz, t);
vec3_scale(t, t, q[3]);
vec3_add(r, v, t);
vec3_add(r, r, u);
}
LINMATH_H_FUNC void mat4x4_from_quat(mat4x4 M, quat const q)
{
float a = q[3];
float b = q[0];
float c = q[1];
float d = q[2];
float a2 = a*a;
float b2 = b*b;
float c2 = c*c;
float d2 = d*d;
M[0][0] = a2 + b2 - c2 - d2;
M[0][1] = 2.f*(b*c + a*d);
M[0][2] = 2.f*(b*d - a*c);
M[0][3] = 0.f;
M[1][0] = 2*(b*c - a*d);
M[1][1] = a2 - b2 + c2 - d2;
M[1][2] = 2.f*(c*d + a*b);
M[1][3] = 0.f;
M[2][0] = 2.f*(b*d + a*c);
M[2][1] = 2.f*(c*d - a*b);
M[2][2] = a2 - b2 - c2 + d2;
M[2][3] = 0.f;
M[3][0] = M[3][1] = M[3][2] = 0.f;
M[3][3] = 1.f;
}
LINMATH_H_FUNC void mat4x4o_mul_quat(mat4x4 R, mat4x4 const M, quat const q)
{
/* XXX: The way this is written only works for orthogonal matrices. */
/* TODO: Take care of non-orthogonal case. */
quat_mul_vec3(R[0], q, M[0]);
quat_mul_vec3(R[1], q, M[1]);
quat_mul_vec3(R[2], q, M[2]);
R[3][0] = R[3][1] = R[3][2] = 0.f;
R[0][3] = M[0][3];
R[1][3] = M[1][3];
R[2][3] = M[2][3];
R[3][3] = M[3][3]; // typically 1.0, but here we make it general
}
LINMATH_H_FUNC void quat_from_mat4x4(quat q, mat4x4 const M)
{
float r=0.f;
int i;
int perm[] = { 0, 1, 2, 0, 1 };
int *p = perm;
for(i = 0; i<3; i++) {
float m = M[i][i];
if( m < r )
continue;
m = r;
p = &perm[i];
}
r = sqrtf(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] );
if(r < 1e-6) {
q[0] = 1.f;
q[1] = q[2] = q[3] = 0.f;
return;
}
q[0] = r/2.f;
q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r);
q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r);
q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r);
}
LINMATH_H_FUNC void mat4x4_arcball(mat4x4 R, mat4x4 const M, vec2 const _a, vec2 const _b, float s)
{
vec2 a; memcpy(a, _a, sizeof(a));
vec2 b; memcpy(b, _b, sizeof(b));
float z_a = 0.f;
float z_b = 0.f;
if(vec2_len(a) < 1.f) {
z_a = sqrtf(1.f - vec2_mul_inner(a, a));
} else {
vec2_norm(a, a);
}
if(vec2_len(b) < 1.f) {
z_b = sqrtf(1.f - vec2_mul_inner(b, b));
} else {
vec2_norm(b, b);
}
vec3 a_ = {a[0], a[1], z_a};
vec3 b_ = {b[0], b[1], z_b};
vec3 c_;
vec3_mul_cross(c_, a_, b_);
float const angle = acos(vec3_mul_inner(a_, b_)) * s;
mat4x4_rotate(R, M, c_[0], c_[1], c_[2], angle);
}
#endif

View File

@ -0,0 +1,117 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
#define NONAMELESSUNION 1
#endif
#if defined(NONAMELESSSTRUCT) && \
!defined(NONAMELESSUNION)
#define NONAMELESSUNION 1
#endif
#if defined(NONAMELESSUNION) && \
!defined(NONAMELESSSTRUCT)
#define NONAMELESSSTRUCT 1
#endif
#if !defined(__GNU_EXTENSION)
#if defined(__GNUC__) || defined(__GNUG__)
#define __GNU_EXTENSION __extension__
#else
#define __GNU_EXTENSION
#endif
#endif /* __extension__ */
#ifndef __ANONYMOUS_DEFINED
#define __ANONYMOUS_DEFINED
#if defined(__GNUC__) || defined(__GNUG__)
#define _ANONYMOUS_UNION __extension__
#define _ANONYMOUS_STRUCT __extension__
#else
#define _ANONYMOUS_UNION
#define _ANONYMOUS_STRUCT
#endif
#ifndef NONAMELESSUNION
#define _UNION_NAME(x)
#define _STRUCT_NAME(x)
#else /* NONAMELESSUNION */
#define _UNION_NAME(x) x
#define _STRUCT_NAME(x) x
#endif
#endif /* __ANONYMOUS_DEFINED */
#ifndef DUMMYUNIONNAME
# ifdef NONAMELESSUNION
# define DUMMYUNIONNAME u
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
# define DUMMYUNIONNAME2 u2
# define DUMMYUNIONNAME3 u3
# define DUMMYUNIONNAME4 u4
# define DUMMYUNIONNAME5 u5
# define DUMMYUNIONNAME6 u6
# define DUMMYUNIONNAME7 u7
# define DUMMYUNIONNAME8 u8
# define DUMMYUNIONNAME9 u9
# else /* NONAMELESSUNION */
# define DUMMYUNIONNAME
# define DUMMYUNIONNAME1 /* Wine uses this variant */
# define DUMMYUNIONNAME2
# define DUMMYUNIONNAME3
# define DUMMYUNIONNAME4
# define DUMMYUNIONNAME5
# define DUMMYUNIONNAME6
# define DUMMYUNIONNAME7
# define DUMMYUNIONNAME8
# define DUMMYUNIONNAME9
# endif
#endif /* DUMMYUNIONNAME */
#if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */
# ifdef NONAMELESSUNION
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
# else
# define DUMMYUNIONNAME1 /* Wine uses this variant */
# endif
#endif /* DUMMYUNIONNAME1 */
#ifndef DUMMYSTRUCTNAME
# ifdef NONAMELESSUNION
# define DUMMYSTRUCTNAME s
# define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */
# define DUMMYSTRUCTNAME2 s2
# define DUMMYSTRUCTNAME3 s3
# define DUMMYSTRUCTNAME4 s4
# define DUMMYSTRUCTNAME5 s5
# else
# define DUMMYSTRUCTNAME
# define DUMMYSTRUCTNAME1 /* Wine uses this variant */
# define DUMMYSTRUCTNAME2
# define DUMMYSTRUCTNAME3
# define DUMMYSTRUCTNAME4
# define DUMMYSTRUCTNAME5
# endif
#endif /* DUMMYSTRUCTNAME */
/* These are for compatibility with the Wine source tree */
#ifndef WINELIB_NAME_AW
# ifdef __MINGW_NAME_AW
# define WINELIB_NAME_AW __MINGW_NAME_AW
# else
# ifdef UNICODE
# define WINELIB_NAME_AW(func) func##W
# else
# define WINELIB_NAME_AW(func) func##A
# endif
# endif
#endif /* WINELIB_NAME_AW */
#ifndef DECL_WINELIB_TYPE_AW
# ifdef __MINGW_TYPEDEF_AW
# define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW
# else
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
# endif
#endif /* DECL_WINELIB_TYPE_AW */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,239 @@
/*
* The Wine project - Xinput Joystick Library
* Copyright 2008 Andrew Fenn
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_XINPUT_H
#define __WINE_XINPUT_H
#include <windef.h>
/*
* Bitmasks for the joysticks buttons, determines what has
* been pressed on the joystick, these need to be mapped
* to whatever device you're using instead of an xbox 360
* joystick
*/
#define XINPUT_GAMEPAD_DPAD_UP 0x0001
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004
#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008
#define XINPUT_GAMEPAD_START 0x0010
#define XINPUT_GAMEPAD_BACK 0x0020
#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040
#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080
#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100
#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200
#define XINPUT_GAMEPAD_A 0x1000
#define XINPUT_GAMEPAD_B 0x2000
#define XINPUT_GAMEPAD_X 0x4000
#define XINPUT_GAMEPAD_Y 0x8000
/*
* Defines the flags used to determine if the user is pushing
* down on a button, not holding a button, etc
*/
#define XINPUT_KEYSTROKE_KEYDOWN 0x0001
#define XINPUT_KEYSTROKE_KEYUP 0x0002
#define XINPUT_KEYSTROKE_REPEAT 0x0004
/*
* Defines the codes which are returned by XInputGetKeystroke
*/
#define VK_PAD_A 0x5800
#define VK_PAD_B 0x5801
#define VK_PAD_X 0x5802
#define VK_PAD_Y 0x5803
#define VK_PAD_RSHOULDER 0x5804
#define VK_PAD_LSHOULDER 0x5805
#define VK_PAD_LTRIGGER 0x5806
#define VK_PAD_RTRIGGER 0x5807
#define VK_PAD_DPAD_UP 0x5810
#define VK_PAD_DPAD_DOWN 0x5811
#define VK_PAD_DPAD_LEFT 0x5812
#define VK_PAD_DPAD_RIGHT 0x5813
#define VK_PAD_START 0x5814
#define VK_PAD_BACK 0x5815
#define VK_PAD_LTHUMB_PRESS 0x5816
#define VK_PAD_RTHUMB_PRESS 0x5817
#define VK_PAD_LTHUMB_UP 0x5820
#define VK_PAD_LTHUMB_DOWN 0x5821
#define VK_PAD_LTHUMB_RIGHT 0x5822
#define VK_PAD_LTHUMB_LEFT 0x5823
#define VK_PAD_LTHUMB_UPLEFT 0x5824
#define VK_PAD_LTHUMB_UPRIGHT 0x5825
#define VK_PAD_LTHUMB_DOWNRIGHT 0x5826
#define VK_PAD_LTHUMB_DOWNLEFT 0x5827
#define VK_PAD_RTHUMB_UP 0x5830
#define VK_PAD_RTHUMB_DOWN 0x5831
#define VK_PAD_RTHUMB_RIGHT 0x5832
#define VK_PAD_RTHUMB_LEFT 0x5833
#define VK_PAD_RTHUMB_UPLEFT 0x5834
#define VK_PAD_RTHUMB_UPRIGHT 0x5835
#define VK_PAD_RTHUMB_DOWNRIGHT 0x5836
#define VK_PAD_RTHUMB_DOWNLEFT 0x5837
/*
* Deadzones are for analogue joystick controls on the joypad
* which determine when input should be assumed to be in the
* middle of the pad. This is a threshold to stop a joypad
* controlling the game when the player isn't touching the
* controls.
*/
#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849
#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30
/*
* Defines what type of abilities the type of joystick has
* DEVTYPE_GAMEPAD is available for all joysticks, however
* there may be more specific identifiers for other joysticks
* which are being used.
*/
#define XINPUT_DEVTYPE_GAMEPAD 0x01
#define XINPUT_DEVSUBTYPE_GAMEPAD 0x01
#define XINPUT_DEVSUBTYPE_WHEEL 0x02
#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
#define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04
#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
#define XINPUT_DEVSUBTYPE_GUITAR 0x06
#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
/*
* These are used with the XInputGetCapabilities function to
* determine the abilities to the joystick which has been
* plugged in.
*/
#define XINPUT_CAPS_VOICE_SUPPORTED 0x0004
#define XINPUT_FLAG_GAMEPAD 0x00000001
/*
* Defines the status of the battery if one is used in the
* attached joystick. The first two define if the joystick
* supports a battery. Disconnected means that the joystick
* isn't connected. Wired shows that the joystick is a wired
* joystick.
*/
#define BATTERY_DEVTYPE_GAMEPAD 0x00
#define BATTERY_DEVTYPE_HEADSET 0x01
#define BATTERY_TYPE_DISCONNECTED 0x00
#define BATTERY_TYPE_WIRED 0x01
#define BATTERY_TYPE_ALKALINE 0x02
#define BATTERY_TYPE_NIMH 0x03
#define BATTERY_TYPE_UNKNOWN 0xFF
#define BATTERY_LEVEL_EMPTY 0x00
#define BATTERY_LEVEL_LOW 0x01
#define BATTERY_LEVEL_MEDIUM 0x02
#define BATTERY_LEVEL_FULL 0x03
/*
* How many joysticks can be used with this library. Games that
* use the xinput library will not go over this number.
*/
#define XUSER_MAX_COUNT 4
#define XUSER_INDEX_ANY 0x000000FF
/*
* Defines the structure of an xbox 360 joystick.
*/
typedef struct _XINPUT_GAMEPAD {
WORD wButtons;
BYTE bLeftTrigger;
BYTE bRightTrigger;
SHORT sThumbLX;
SHORT sThumbLY;
SHORT sThumbRX;
SHORT sThumbRY;
} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
typedef struct _XINPUT_STATE {
DWORD dwPacketNumber;
XINPUT_GAMEPAD Gamepad;
} XINPUT_STATE, *PXINPUT_STATE;
/*
* Defines the structure of how much vibration is set on both the
* right and left motors in a joystick. If you're not using a 360
* joystick you will have to map these to your device.
*/
typedef struct _XINPUT_VIBRATION {
WORD wLeftMotorSpeed;
WORD wRightMotorSpeed;
} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
/*
* Defines the structure for what kind of abilities the joystick has
* such abilities are things such as if the joystick has the ability
* to send and receive audio, if the joystick is in fact a driving
* wheel or perhaps if the joystick is some kind of dance pad or
* guitar.
*/
typedef struct _XINPUT_CAPABILITIES {
BYTE Type;
BYTE SubType;
WORD Flags;
XINPUT_GAMEPAD Gamepad;
XINPUT_VIBRATION Vibration;
} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
/*
* Defines the structure for a joystick input event which is
* retrieved using the function XInputGetKeystroke
*/
typedef struct _XINPUT_KEYSTROKE {
WORD VirtualKey;
WCHAR Unicode;
WORD Flags;
BYTE UserIndex;
BYTE HidCode;
} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
typedef struct _XINPUT_BATTERY_INFORMATION
{
BYTE BatteryType;
BYTE BatteryLevel;
} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
#ifdef __cplusplus
extern "C" {
#endif
void WINAPI XInputEnable(WINBOOL);
DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_XINPUT_H */

Binary file not shown.

View File

@ -0,0 +1,381 @@
/*
* Nuklear - v1.32.0 - public domain
* no warrenty implied; use at your own risk.
* authored from 2015-2017 by Micha Mettke
*/
/*
* ==============================================================
*
* API
*
* ===============================================================
*/
#ifndef NK_GLFW_GL2_H_
#define NK_GLFW_GL2_H_
#include <GLFW/glfw3.h>
enum nk_glfw_init_state{
NK_GLFW3_DEFAULT = 0,
NK_GLFW3_INSTALL_CALLBACKS
};
NK_API struct nk_context* nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state);
NK_API void nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas);
NK_API void nk_glfw3_font_stash_end(void);
NK_API void nk_glfw3_new_frame(void);
NK_API void nk_glfw3_render(enum nk_anti_aliasing);
NK_API void nk_glfw3_shutdown(void);
NK_API void nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint);
NK_API void nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff);
#endif
/*
* ==============================================================
*
* IMPLEMENTATION
*
* ===============================================================
*/
#ifdef NK_GLFW_GL2_IMPLEMENTATION
#ifndef NK_GLFW_TEXT_MAX
#define NK_GLFW_TEXT_MAX 256
#endif
#ifndef NK_GLFW_DOUBLE_CLICK_LO
#define NK_GLFW_DOUBLE_CLICK_LO 0.02
#endif
#ifndef NK_GLFW_DOUBLE_CLICK_HI
#define NK_GLFW_DOUBLE_CLICK_HI 0.2
#endif
struct nk_glfw_device {
struct nk_buffer cmds;
struct nk_draw_null_texture null;
GLuint font_tex;
};
struct nk_glfw_vertex {
float position[2];
float uv[2];
nk_byte col[4];
};
static struct nk_glfw {
GLFWwindow *win;
int width, height;
int display_width, display_height;
struct nk_glfw_device ogl;
struct nk_context ctx;
struct nk_font_atlas atlas;
struct nk_vec2 fb_scale;
unsigned int text[NK_GLFW_TEXT_MAX];
int text_len;
struct nk_vec2 scroll;
double last_button_click;
int is_double_click_down;
struct nk_vec2 double_click_pos;
} glfw;
NK_INTERN void
nk_glfw3_device_upload_atlas(const void *image, int width, int height)
{
struct nk_glfw_device *dev = &glfw.ogl;
glGenTextures(1, &dev->font_tex);
glBindTexture(GL_TEXTURE_2D, dev->font_tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, image);
}
NK_API void
nk_glfw3_render(enum nk_anti_aliasing AA)
{
/* setup global state */
struct nk_glfw_device *dev = &glfw.ogl;
glPushAttrib(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_TRANSFORM_BIT);
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);
glEnable(GL_SCISSOR_TEST);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* setup viewport/project */
glViewport(0,0,(GLsizei)glfw.display_width,(GLsizei)glfw.display_height);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0.0f, glfw.width, glfw.height, 0.0f, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
{
GLsizei vs = sizeof(struct nk_glfw_vertex);
size_t vp = offsetof(struct nk_glfw_vertex, position);
size_t vt = offsetof(struct nk_glfw_vertex, uv);
size_t vc = offsetof(struct nk_glfw_vertex, col);
/* convert from command queue into draw list and draw to screen */
const struct nk_draw_command *cmd;
const nk_draw_index *offset = NULL;
struct nk_buffer vbuf, ebuf;
/* fill convert configuration */
struct nk_convert_config config;
static const struct nk_draw_vertex_layout_element vertex_layout[] = {
{NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, position)},
{NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, uv)},
{NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_glfw_vertex, col)},
{NK_VERTEX_LAYOUT_END}
};
NK_MEMSET(&config, 0, sizeof(config));
config.vertex_layout = vertex_layout;
config.vertex_size = sizeof(struct nk_glfw_vertex);
config.vertex_alignment = NK_ALIGNOF(struct nk_glfw_vertex);
config.null = dev->null;
config.circle_segment_count = 22;
config.curve_segment_count = 22;
config.arc_segment_count = 22;
config.global_alpha = 1.0f;
config.shape_AA = AA;
config.line_AA = AA;
/* convert shapes into vertexes */
nk_buffer_init_default(&vbuf);
nk_buffer_init_default(&ebuf);
nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);
/* setup vertex buffer pointer */
{const void *vertices = nk_buffer_memory_const(&vbuf);
glVertexPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vp));
glTexCoordPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vt));
glColorPointer(4, GL_UNSIGNED_BYTE, vs, (const void*)((const nk_byte*)vertices + vc));}
/* iterate over and execute each draw command */
offset = (const nk_draw_index*)nk_buffer_memory_const(&ebuf);
nk_draw_foreach(cmd, &glfw.ctx, &dev->cmds)
{
if (!cmd->elem_count) continue;
glBindTexture(GL_TEXTURE_2D, (GLuint)cmd->texture.id);
glScissor(
(GLint)(cmd->clip_rect.x * glfw.fb_scale.x),
(GLint)((glfw.height - (GLint)(cmd->clip_rect.y + cmd->clip_rect.h)) * glfw.fb_scale.y),
(GLint)(cmd->clip_rect.w * glfw.fb_scale.x),
(GLint)(cmd->clip_rect.h * glfw.fb_scale.y));
glDrawElements(GL_TRIANGLES, (GLsizei)cmd->elem_count, GL_UNSIGNED_SHORT, offset);
offset += cmd->elem_count;
}
nk_clear(&glfw.ctx);
nk_buffer_free(&vbuf);
nk_buffer_free(&ebuf);
}
/* default OpenGL state */
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glPopAttrib();
}
NK_API void
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
{
(void)win;
if (glfw.text_len < NK_GLFW_TEXT_MAX)
glfw.text[glfw.text_len++] = codepoint;
}
NK_API void
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
{
(void)win; (void)xoff;
glfw.scroll.x += (float)xoff;
glfw.scroll.y += (float)yoff;
}
NK_API void
nk_glfw3_mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
{
double x, y;
if (button != GLFW_MOUSE_BUTTON_LEFT) return;
glfwGetCursorPos(window, &x, &y);
if (action == GLFW_PRESS) {
double dt = glfwGetTime() - glfw.last_button_click;
if (dt > NK_GLFW_DOUBLE_CLICK_LO && dt < NK_GLFW_DOUBLE_CLICK_HI) {
glfw.is_double_click_down = nk_true;
glfw.double_click_pos = nk_vec2((float)x, (float)y);
}
glfw.last_button_click = glfwGetTime();
} else glfw.is_double_click_down = nk_false;
}
NK_INTERN void
nk_glfw3_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
const char *text = glfwGetClipboardString(glfw.win);
if (text) nk_textedit_paste(edit, text, nk_strlen(text));
(void)usr;
}
NK_INTERN void
nk_glfw3_clipboard_copy(nk_handle usr, const char *text, int len)
{
char *str = 0;
(void)usr;
if (!len) return;
str = (char*)malloc((size_t)len+1);
if (!str) return;
NK_MEMCPY(str, text, (size_t)len);
str[len] = '\0';
glfwSetClipboardString(glfw.win, str);
free(str);
}
NK_API struct nk_context*
nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)
{
glfw.win = win;
if (init_state == NK_GLFW3_INSTALL_CALLBACKS) {
glfwSetScrollCallback(win, nk_gflw3_scroll_callback);
glfwSetCharCallback(win, nk_glfw3_char_callback);
glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback);
}
nk_init_default(&glfw.ctx, 0);
glfw.ctx.clip.copy = nk_glfw3_clipboard_copy;
glfw.ctx.clip.paste = nk_glfw3_clipboard_paste;
glfw.ctx.clip.userdata = nk_handle_ptr(0);
nk_buffer_init_default(&glfw.ogl.cmds);
glfw.is_double_click_down = nk_false;
glfw.double_click_pos = nk_vec2(0, 0);
return &glfw.ctx;
}
NK_API void
nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)
{
nk_font_atlas_init_default(&glfw.atlas);
nk_font_atlas_begin(&glfw.atlas);
*atlas = &glfw.atlas;
}
NK_API void
nk_glfw3_font_stash_end(void)
{
const void *image; int w, h;
image = nk_font_atlas_bake(&glfw.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);
nk_glfw3_device_upload_atlas(image, w, h);
nk_font_atlas_end(&glfw.atlas, nk_handle_id((int)glfw.ogl.font_tex), &glfw.ogl.null);
if (glfw.atlas.default_font)
nk_style_set_font(&glfw.ctx, &glfw.atlas.default_font->handle);
}
NK_API void
nk_glfw3_new_frame(void)
{
int i;
double x, y;
struct nk_context *ctx = &glfw.ctx;
struct GLFWwindow *win = glfw.win;
glfwGetWindowSize(win, &glfw.width, &glfw.height);
glfwGetFramebufferSize(win, &glfw.display_width, &glfw.display_height);
glfw.fb_scale.x = (float)glfw.display_width/(float)glfw.width;
glfw.fb_scale.y = (float)glfw.display_height/(float)glfw.height;
nk_input_begin(ctx);
for (i = 0; i < glfw.text_len; ++i)
nk_input_unicode(ctx, glfw.text[i]);
/* optional grabbing behavior */
if (ctx->input.mouse.grab)
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
else if (ctx->input.mouse.ungrab)
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
nk_input_key(ctx, NK_KEY_DEL, glfwGetKey(win, GLFW_KEY_DELETE) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_ENTER, glfwGetKey(win, GLFW_KEY_ENTER) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TAB, glfwGetKey(win, GLFW_KEY_TAB) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_BACKSPACE, glfwGetKey(win, GLFW_KEY_BACKSPACE) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_UP, glfwGetKey(win, GLFW_KEY_UP) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_DOWN, glfwGetKey(win, GLFW_KEY_DOWN) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_SCROLL_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_SCROLL_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_SCROLL_DOWN, glfwGetKey(win, GLFW_KEY_PAGE_DOWN) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_SCROLL_UP, glfwGetKey(win, GLFW_KEY_PAGE_UP) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_SHIFT, glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS||
glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {
nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_V) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_UNDO, glfwGetKey(win, GLFW_KEY_Z) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_REDO, glfwGetKey(win, GLFW_KEY_R) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_LINE_START, glfwGetKey(win, GLFW_KEY_B) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, glfwGetKey(win, GLFW_KEY_E) == GLFW_PRESS);
} else {
nk_input_key(ctx, NK_KEY_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}
glfwGetCursorPos(win, &x, &y);
nk_input_motion(ctx, (int)x, (int)y);
if (ctx->input.mouse.grabbed) {
glfwSetCursorPos(glfw.win, (double)ctx->input.mouse.prev.x, (double)ctx->input.mouse.prev.y);
ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;
ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;
}
nk_input_button(ctx, NK_BUTTON_LEFT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS);
nk_input_button(ctx, NK_BUTTON_MIDDLE, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS);
nk_input_button(ctx, NK_BUTTON_RIGHT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS);
nk_input_button(ctx, NK_BUTTON_DOUBLE, (int)glfw.double_click_pos.x, (int)glfw.double_click_pos.y, glfw.is_double_click_down);
nk_input_scroll(ctx, glfw.scroll);
nk_input_end(&glfw.ctx);
glfw.text_len = 0;
glfw.scroll = nk_vec2(0,0);
}
NK_API
void nk_glfw3_shutdown(void)
{
struct nk_glfw_device *dev = &glfw.ogl;
nk_font_atlas_clear(&glfw.atlas);
nk_free(&glfw.ctx);
glDeleteTextures(1, &dev->font_tex);
nk_buffer_free(&dev->cmds);
NK_MEMSET(&glfw, 0, sizeof(glfw));
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,594 @@
/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-
Copyright (c) 2012 Marcus Geelnard
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
/* 2013-01-06 Camilla Löwy <elmindreda@glfw.org>
*
* Added casts from time_t to DWORD to avoid warnings on VC++.
* Fixed time retrieval on POSIX systems.
*/
#include "tinycthread.h"
#include <stdlib.h>
/* Platform specific includes */
#if defined(_TTHREAD_POSIX_)
#include <signal.h>
#include <sched.h>
#include <unistd.h>
#include <sys/time.h>
#include <errno.h>
#elif defined(_TTHREAD_WIN32_)
#include <process.h>
#include <sys/timeb.h>
#endif
/* Standard, good-to-have defines */
#ifndef NULL
#define NULL (void*)0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
int mtx_init(mtx_t *mtx, int type)
{
#if defined(_TTHREAD_WIN32_)
mtx->mAlreadyLocked = FALSE;
mtx->mRecursive = type & mtx_recursive;
InitializeCriticalSection(&mtx->mHandle);
return thrd_success;
#else
int ret;
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
if (type & mtx_recursive)
{
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
}
ret = pthread_mutex_init(mtx, &attr);
pthread_mutexattr_destroy(&attr);
return ret == 0 ? thrd_success : thrd_error;
#endif
}
void mtx_destroy(mtx_t *mtx)
{
#if defined(_TTHREAD_WIN32_)
DeleteCriticalSection(&mtx->mHandle);
#else
pthread_mutex_destroy(mtx);
#endif
}
int mtx_lock(mtx_t *mtx)
{
#if defined(_TTHREAD_WIN32_)
EnterCriticalSection(&mtx->mHandle);
if (!mtx->mRecursive)
{
while(mtx->mAlreadyLocked) Sleep(1000); /* Simulate deadlock... */
mtx->mAlreadyLocked = TRUE;
}
return thrd_success;
#else
return pthread_mutex_lock(mtx) == 0 ? thrd_success : thrd_error;
#endif
}
int mtx_timedlock(mtx_t *mtx, const struct timespec *ts)
{
/* FIXME! */
(void)mtx;
(void)ts;
return thrd_error;
}
int mtx_trylock(mtx_t *mtx)
{
#if defined(_TTHREAD_WIN32_)
int ret = TryEnterCriticalSection(&mtx->mHandle) ? thrd_success : thrd_busy;
if ((!mtx->mRecursive) && (ret == thrd_success) && mtx->mAlreadyLocked)
{
LeaveCriticalSection(&mtx->mHandle);
ret = thrd_busy;
}
return ret;
#else
return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy;
#endif
}
int mtx_unlock(mtx_t *mtx)
{
#if defined(_TTHREAD_WIN32_)
mtx->mAlreadyLocked = FALSE;
LeaveCriticalSection(&mtx->mHandle);
return thrd_success;
#else
return pthread_mutex_unlock(mtx) == 0 ? thrd_success : thrd_error;;
#endif
}
#if defined(_TTHREAD_WIN32_)
#define _CONDITION_EVENT_ONE 0
#define _CONDITION_EVENT_ALL 1
#endif
int cnd_init(cnd_t *cond)
{
#if defined(_TTHREAD_WIN32_)
cond->mWaitersCount = 0;
/* Init critical section */
InitializeCriticalSection(&cond->mWaitersCountLock);
/* Init events */
cond->mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL);
if (cond->mEvents[_CONDITION_EVENT_ONE] == NULL)
{
cond->mEvents[_CONDITION_EVENT_ALL] = NULL;
return thrd_error;
}
cond->mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL);
if (cond->mEvents[_CONDITION_EVENT_ALL] == NULL)
{
CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);
cond->mEvents[_CONDITION_EVENT_ONE] = NULL;
return thrd_error;
}
return thrd_success;
#else
return pthread_cond_init(cond, NULL) == 0 ? thrd_success : thrd_error;
#endif
}
void cnd_destroy(cnd_t *cond)
{
#if defined(_TTHREAD_WIN32_)
if (cond->mEvents[_CONDITION_EVENT_ONE] != NULL)
{
CloseHandle(cond->mEvents[_CONDITION_EVENT_ONE]);
}
if (cond->mEvents[_CONDITION_EVENT_ALL] != NULL)
{
CloseHandle(cond->mEvents[_CONDITION_EVENT_ALL]);
}
DeleteCriticalSection(&cond->mWaitersCountLock);
#else
pthread_cond_destroy(cond);
#endif
}
int cnd_signal(cnd_t *cond)
{
#if defined(_TTHREAD_WIN32_)
int haveWaiters;
/* Are there any waiters? */
EnterCriticalSection(&cond->mWaitersCountLock);
haveWaiters = (cond->mWaitersCount > 0);
LeaveCriticalSection(&cond->mWaitersCountLock);
/* If we have any waiting threads, send them a signal */
if(haveWaiters)
{
if (SetEvent(cond->mEvents[_CONDITION_EVENT_ONE]) == 0)
{
return thrd_error;
}
}
return thrd_success;
#else
return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
#endif
}
int cnd_broadcast(cnd_t *cond)
{
#if defined(_TTHREAD_WIN32_)
int haveWaiters;
/* Are there any waiters? */
EnterCriticalSection(&cond->mWaitersCountLock);
haveWaiters = (cond->mWaitersCount > 0);
LeaveCriticalSection(&cond->mWaitersCountLock);
/* If we have any waiting threads, send them a signal */
if(haveWaiters)
{
if (SetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)
{
return thrd_error;
}
}
return thrd_success;
#else
return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
#endif
}
#if defined(_TTHREAD_WIN32_)
static int _cnd_timedwait_win32(cnd_t *cond, mtx_t *mtx, DWORD timeout)
{
int result, lastWaiter;
/* Increment number of waiters */
EnterCriticalSection(&cond->mWaitersCountLock);
++ cond->mWaitersCount;
LeaveCriticalSection(&cond->mWaitersCountLock);
/* Release the mutex while waiting for the condition (will decrease
the number of waiters when done)... */
mtx_unlock(mtx);
/* Wait for either event to become signaled due to cnd_signal() or
cnd_broadcast() being called */
result = WaitForMultipleObjects(2, cond->mEvents, FALSE, timeout);
if (result == WAIT_TIMEOUT)
{
return thrd_timeout;
}
else if (result == (int)WAIT_FAILED)
{
return thrd_error;
}
/* Check if we are the last waiter */
EnterCriticalSection(&cond->mWaitersCountLock);
-- cond->mWaitersCount;
lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) &&
(cond->mWaitersCount == 0);
LeaveCriticalSection(&cond->mWaitersCountLock);
/* If we are the last waiter to be notified to stop waiting, reset the event */
if (lastWaiter)
{
if (ResetEvent(cond->mEvents[_CONDITION_EVENT_ALL]) == 0)
{
return thrd_error;
}
}
/* Re-acquire the mutex */
mtx_lock(mtx);
return thrd_success;
}
#endif
int cnd_wait(cnd_t *cond, mtx_t *mtx)
{
#if defined(_TTHREAD_WIN32_)
return _cnd_timedwait_win32(cond, mtx, INFINITE);
#else
return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error;
#endif
}
int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts)
{
#if defined(_TTHREAD_WIN32_)
struct timespec now;
if (clock_gettime(CLOCK_REALTIME, &now) == 0)
{
DWORD delta = (DWORD) ((ts->tv_sec - now.tv_sec) * 1000 +
(ts->tv_nsec - now.tv_nsec + 500000) / 1000000);
return _cnd_timedwait_win32(cond, mtx, delta);
}
else
return thrd_error;
#else
int ret;
ret = pthread_cond_timedwait(cond, mtx, ts);
if (ret == ETIMEDOUT)
{
return thrd_timeout;
}
return ret == 0 ? thrd_success : thrd_error;
#endif
}
/** Information to pass to the new thread (what to run). */
typedef struct {
thrd_start_t mFunction; /**< Pointer to the function to be executed. */
void * mArg; /**< Function argument for the thread function. */
} _thread_start_info;
/* Thread wrapper function. */
#if defined(_TTHREAD_WIN32_)
static unsigned WINAPI _thrd_wrapper_function(void * aArg)
#elif defined(_TTHREAD_POSIX_)
static void * _thrd_wrapper_function(void * aArg)
#endif
{
thrd_start_t fun;
void *arg;
int res;
#if defined(_TTHREAD_POSIX_)
void *pres;
#endif
/* Get thread startup information */
_thread_start_info *ti = (_thread_start_info *) aArg;
fun = ti->mFunction;
arg = ti->mArg;
/* The thread is responsible for freeing the startup information */
free((void *)ti);
/* Call the actual client thread function */
res = fun(arg);
#if defined(_TTHREAD_WIN32_)
return res;
#else
pres = malloc(sizeof(int));
if (pres != NULL)
{
*(int*)pres = res;
}
return pres;
#endif
}
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
{
/* Fill out the thread startup information (passed to the thread wrapper,
which will eventually free it) */
_thread_start_info* ti = (_thread_start_info*)malloc(sizeof(_thread_start_info));
if (ti == NULL)
{
return thrd_nomem;
}
ti->mFunction = func;
ti->mArg = arg;
/* Create the thread */
#if defined(_TTHREAD_WIN32_)
*thr = (HANDLE)_beginthreadex(NULL, 0, _thrd_wrapper_function, (void *)ti, 0, NULL);
#elif defined(_TTHREAD_POSIX_)
if(pthread_create(thr, NULL, _thrd_wrapper_function, (void *)ti) != 0)
{
*thr = 0;
}
#endif
/* Did we fail to create the thread? */
if(!*thr)
{
free(ti);
return thrd_error;
}
return thrd_success;
}
thrd_t thrd_current(void)
{
#if defined(_TTHREAD_WIN32_)
return GetCurrentThread();
#else
return pthread_self();
#endif
}
int thrd_detach(thrd_t thr)
{
/* FIXME! */
(void)thr;
return thrd_error;
}
int thrd_equal(thrd_t thr0, thrd_t thr1)
{
#if defined(_TTHREAD_WIN32_)
return thr0 == thr1;
#else
return pthread_equal(thr0, thr1);
#endif
}
void thrd_exit(int res)
{
#if defined(_TTHREAD_WIN32_)
ExitThread(res);
#else
void *pres = malloc(sizeof(int));
if (pres != NULL)
{
*(int*)pres = res;
}
pthread_exit(pres);
#endif
}
int thrd_join(thrd_t thr, int *res)
{
#if defined(_TTHREAD_WIN32_)
if (WaitForSingleObject(thr, INFINITE) == WAIT_FAILED)
{
return thrd_error;
}
if (res != NULL)
{
DWORD dwRes;
GetExitCodeThread(thr, &dwRes);
*res = dwRes;
}
#elif defined(_TTHREAD_POSIX_)
void *pres;
int ires = 0;
if (pthread_join(thr, &pres) != 0)
{
return thrd_error;
}
if (pres != NULL)
{
ires = *(int*)pres;
free(pres);
}
if (res != NULL)
{
*res = ires;
}
#endif
return thrd_success;
}
int thrd_sleep(const struct timespec *time_point, struct timespec *remaining)
{
struct timespec now;
#if defined(_TTHREAD_WIN32_)
DWORD delta;
#else
long delta;
#endif
/* Get the current time */
if (clock_gettime(CLOCK_REALTIME, &now) != 0)
return -2; // FIXME: Some specific error code?
#if defined(_TTHREAD_WIN32_)
/* Delta in milliseconds */
delta = (DWORD) ((time_point->tv_sec - now.tv_sec) * 1000 +
(time_point->tv_nsec - now.tv_nsec + 500000) / 1000000);
if (delta > 0)
{
Sleep(delta);
}
#else
/* Delta in microseconds */
delta = (time_point->tv_sec - now.tv_sec) * 1000000L +
(time_point->tv_nsec - now.tv_nsec + 500L) / 1000L;
/* On some systems, the usleep argument must be < 1000000 */
while (delta > 999999L)
{
usleep(999999);
delta -= 999999L;
}
if (delta > 0L)
{
usleep((useconds_t)delta);
}
#endif
/* We don't support waking up prematurely (yet) */
if (remaining)
{
remaining->tv_sec = 0;
remaining->tv_nsec = 0;
}
return 0;
}
void thrd_yield(void)
{
#if defined(_TTHREAD_WIN32_)
Sleep(0);
#else
sched_yield();
#endif
}
int tss_create(tss_t *key, tss_dtor_t dtor)
{
#if defined(_TTHREAD_WIN32_)
/* FIXME: The destructor function is not supported yet... */
if (dtor != NULL)
{
return thrd_error;
}
*key = TlsAlloc();
if (*key == TLS_OUT_OF_INDEXES)
{
return thrd_error;
}
#else
if (pthread_key_create(key, dtor) != 0)
{
return thrd_error;
}
#endif
return thrd_success;
}
void tss_delete(tss_t key)
{
#if defined(_TTHREAD_WIN32_)
TlsFree(key);
#else
pthread_key_delete(key);
#endif
}
void *tss_get(tss_t key)
{
#if defined(_TTHREAD_WIN32_)
return TlsGetValue(key);
#else
return pthread_getspecific(key);
#endif
}
int tss_set(tss_t key, void *val)
{
#if defined(_TTHREAD_WIN32_)
if (TlsSetValue(key, val) == 0)
{
return thrd_error;
}
#else
if (pthread_setspecific(key, val) != 0)
{
return thrd_error;
}
#endif
return thrd_success;
}
#if defined(_TTHREAD_EMULATE_CLOCK_GETTIME_)
int _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts)
{
#if defined(_TTHREAD_WIN32_)
struct _timeb tb;
_ftime(&tb);
ts->tv_sec = (time_t)tb.time;
ts->tv_nsec = 1000000L * (long)tb.millitm;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
ts->tv_sec = (time_t)tv.tv_sec;
ts->tv_nsec = 1000L * (long)tv.tv_usec;
#endif
return 0;
}
#endif // _TTHREAD_EMULATE_CLOCK_GETTIME_

View File

@ -0,0 +1,443 @@
/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; -*-
Copyright (c) 2012 Marcus Geelnard
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#ifndef _TINYCTHREAD_H_
#define _TINYCTHREAD_H_
/**
* @file
* @mainpage TinyCThread API Reference
*
* @section intro_sec Introduction
* TinyCThread is a minimal, portable implementation of basic threading
* classes for C.
*
* They closely mimic the functionality and naming of the C11 standard, and
* should be easily replaceable with the corresponding standard variants.
*
* @section port_sec Portability
* The Win32 variant uses the native Win32 API for implementing the thread
* classes, while for other systems, the POSIX threads API (pthread) is used.
*
* @section misc_sec Miscellaneous
* The following special keywords are available: #_Thread_local.
*
* For more detailed information, browse the different sections of this
* documentation. A good place to start is:
* tinycthread.h.
*/
/* Which platform are we on? */
#if !defined(_TTHREAD_PLATFORM_DEFINED_)
#if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
#define _TTHREAD_WIN32_
#else
#define _TTHREAD_POSIX_
#endif
#define _TTHREAD_PLATFORM_DEFINED_
#endif
/* Activate some POSIX functionality (e.g. clock_gettime and recursive mutexes) */
#if defined(_TTHREAD_POSIX_)
#undef _FEATURES_H
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#if !defined(_POSIX_C_SOURCE) || ((_POSIX_C_SOURCE - 0) < 199309L)
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199309L
#endif
#if !defined(_XOPEN_SOURCE) || ((_XOPEN_SOURCE - 0) < 500)
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#endif
#endif
/* Generic includes */
#include <time.h>
/* Platform specific includes */
#if defined(_TTHREAD_POSIX_)
#include <sys/time.h>
#include <pthread.h>
#elif defined(_TTHREAD_WIN32_)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#define __UNDEF_LEAN_AND_MEAN
#endif
#include <windows.h>
#ifdef __UNDEF_LEAN_AND_MEAN
#undef WIN32_LEAN_AND_MEAN
#undef __UNDEF_LEAN_AND_MEAN
#endif
#endif
/* Workaround for missing TIME_UTC: If time.h doesn't provide TIME_UTC,
it's quite likely that libc does not support it either. Hence, fall back to
the only other supported time specifier: CLOCK_REALTIME (and if that fails,
we're probably emulating clock_gettime anyway, so anything goes). */
#ifndef TIME_UTC
#ifdef CLOCK_REALTIME
#define TIME_UTC CLOCK_REALTIME
#else
#define TIME_UTC 0
#endif
#endif
/* Workaround for missing clock_gettime (most Windows compilers, afaik) */
#if defined(_TTHREAD_WIN32_) || defined(__APPLE_CC__)
#define _TTHREAD_EMULATE_CLOCK_GETTIME_
/* Emulate struct timespec */
#if defined(_TTHREAD_WIN32_)
struct _ttherad_timespec {
time_t tv_sec;
long tv_nsec;
};
#define timespec _ttherad_timespec
#endif
/* Emulate clockid_t */
typedef int _tthread_clockid_t;
#define clockid_t _tthread_clockid_t
/* Emulate clock_gettime */
int _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts);
#define clock_gettime _tthread_clock_gettime
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#endif
#endif
/** TinyCThread version (major number). */
#define TINYCTHREAD_VERSION_MAJOR 1
/** TinyCThread version (minor number). */
#define TINYCTHREAD_VERSION_MINOR 1
/** TinyCThread version (full version). */
#define TINYCTHREAD_VERSION (TINYCTHREAD_VERSION_MAJOR * 100 + TINYCTHREAD_VERSION_MINOR)
/**
* @def _Thread_local
* Thread local storage keyword.
* A variable that is declared with the @c _Thread_local keyword makes the
* value of the variable local to each thread (known as thread-local storage,
* or TLS). Example usage:
* @code
* // This variable is local to each thread.
* _Thread_local int variable;
* @endcode
* @note The @c _Thread_local keyword is a macro that maps to the corresponding
* compiler directive (e.g. @c __declspec(thread)).
* @note This directive is currently not supported on Mac OS X (it will give
* a compiler error), since compile-time TLS is not supported in the Mac OS X
* executable format. Also, some older versions of MinGW (before GCC 4.x) do
* not support this directive.
* @hideinitializer
*/
/* FIXME: Check for a PROPER value of __STDC_VERSION__ to know if we have C11 */
#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201102L)) && !defined(_Thread_local)
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
#define _Thread_local __thread
#else
#define _Thread_local __declspec(thread)
#endif
#endif
/* Macros */
#define TSS_DTOR_ITERATIONS 0
/* Function return values */
#define thrd_error 0 /**< The requested operation failed */
#define thrd_success 1 /**< The requested operation succeeded */
#define thrd_timeout 2 /**< The time specified in the call was reached without acquiring the requested resource */
#define thrd_busy 3 /**< The requested operation failed because a tesource requested by a test and return function is already in use */
#define thrd_nomem 4 /**< The requested operation failed because it was unable to allocate memory */
/* Mutex types */
#define mtx_plain 1
#define mtx_timed 2
#define mtx_try 4
#define mtx_recursive 8
/* Mutex */
#if defined(_TTHREAD_WIN32_)
typedef struct {
CRITICAL_SECTION mHandle; /* Critical section handle */
int mAlreadyLocked; /* TRUE if the mutex is already locked */
int mRecursive; /* TRUE if the mutex is recursive */
} mtx_t;
#else
typedef pthread_mutex_t mtx_t;
#endif
/** Create a mutex object.
* @param mtx A mutex object.
* @param type Bit-mask that must have one of the following six values:
* @li @c mtx_plain for a simple non-recursive mutex
* @li @c mtx_timed for a non-recursive mutex that supports timeout
* @li @c mtx_try for a non-recursive mutex that supports test and return
* @li @c mtx_plain | @c mtx_recursive (same as @c mtx_plain, but recursive)
* @li @c mtx_timed | @c mtx_recursive (same as @c mtx_timed, but recursive)
* @li @c mtx_try | @c mtx_recursive (same as @c mtx_try, but recursive)
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int mtx_init(mtx_t *mtx, int type);
/** Release any resources used by the given mutex.
* @param mtx A mutex object.
*/
void mtx_destroy(mtx_t *mtx);
/** Lock the given mutex.
* Blocks until the given mutex can be locked. If the mutex is non-recursive, and
* the calling thread already has a lock on the mutex, this call will block
* forever.
* @param mtx A mutex object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int mtx_lock(mtx_t *mtx);
/** NOT YET IMPLEMENTED.
*/
int mtx_timedlock(mtx_t *mtx, const struct timespec *ts);
/** Try to lock the given mutex.
* The specified mutex shall support either test and return or timeout. If the
* mutex is already locked, the function returns without blocking.
* @param mtx A mutex object.
* @return @ref thrd_success on success, or @ref thrd_busy if the resource
* requested is already in use, or @ref thrd_error if the request could not be
* honored.
*/
int mtx_trylock(mtx_t *mtx);
/** Unlock the given mutex.
* @param mtx A mutex object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int mtx_unlock(mtx_t *mtx);
/* Condition variable */
#if defined(_TTHREAD_WIN32_)
typedef struct {
HANDLE mEvents[2]; /* Signal and broadcast event HANDLEs. */
unsigned int mWaitersCount; /* Count of the number of waiters. */
CRITICAL_SECTION mWaitersCountLock; /* Serialize access to mWaitersCount. */
} cnd_t;
#else
typedef pthread_cond_t cnd_t;
#endif
/** Create a condition variable object.
* @param cond A condition variable object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int cnd_init(cnd_t *cond);
/** Release any resources used by the given condition variable.
* @param cond A condition variable object.
*/
void cnd_destroy(cnd_t *cond);
/** Signal a condition variable.
* Unblocks one of the threads that are blocked on the given condition variable
* at the time of the call. If no threads are blocked on the condition variable
* at the time of the call, the function does nothing and return success.
* @param cond A condition variable object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int cnd_signal(cnd_t *cond);
/** Broadcast a condition variable.
* Unblocks all of the threads that are blocked on the given condition variable
* at the time of the call. If no threads are blocked on the condition variable
* at the time of the call, the function does nothing and return success.
* @param cond A condition variable object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int cnd_broadcast(cnd_t *cond);
/** Wait for a condition variable to become signaled.
* The function atomically unlocks the given mutex and endeavors to block until
* the given condition variable is signaled by a call to cnd_signal or to
* cnd_broadcast. When the calling thread becomes unblocked it locks the mutex
* before it returns.
* @param cond A condition variable object.
* @param mtx A mutex object.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int cnd_wait(cnd_t *cond, mtx_t *mtx);
/** Wait for a condition variable to become signaled.
* The function atomically unlocks the given mutex and endeavors to block until
* the given condition variable is signaled by a call to cnd_signal or to
* cnd_broadcast, or until after the specified time. When the calling thread
* becomes unblocked it locks the mutex before it returns.
* @param cond A condition variable object.
* @param mtx A mutex object.
* @param xt A point in time at which the request will time out (absolute time).
* @return @ref thrd_success upon success, or @ref thrd_timeout if the time
* specified in the call was reached without acquiring the requested resource, or
* @ref thrd_error if the request could not be honored.
*/
int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts);
/* Thread */
#if defined(_TTHREAD_WIN32_)
typedef HANDLE thrd_t;
#else
typedef pthread_t thrd_t;
#endif
/** Thread start function.
* Any thread that is started with the @ref thrd_create() function must be
* started through a function of this type.
* @param arg The thread argument (the @c arg argument of the corresponding
* @ref thrd_create() call).
* @return The thread return value, which can be obtained by another thread
* by using the @ref thrd_join() function.
*/
typedef int (*thrd_start_t)(void *arg);
/** Create a new thread.
* @param thr Identifier of the newly created thread.
* @param func A function pointer to the function that will be executed in
* the new thread.
* @param arg An argument to the thread function.
* @return @ref thrd_success on success, or @ref thrd_nomem if no memory could
* be allocated for the thread requested, or @ref thrd_error if the request
* could not be honored.
* @note A threads identifier may be reused for a different thread once the
* original thread has exited and either been detached or joined to another
* thread.
*/
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg);
/** Identify the calling thread.
* @return The identifier of the calling thread.
*/
thrd_t thrd_current(void);
/** NOT YET IMPLEMENTED.
*/
int thrd_detach(thrd_t thr);
/** Compare two thread identifiers.
* The function determines if two thread identifiers refer to the same thread.
* @return Zero if the two thread identifiers refer to different threads.
* Otherwise a nonzero value is returned.
*/
int thrd_equal(thrd_t thr0, thrd_t thr1);
/** Terminate execution of the calling thread.
* @param res Result code of the calling thread.
*/
void thrd_exit(int res);
/** Wait for a thread to terminate.
* The function joins the given thread with the current thread by blocking
* until the other thread has terminated.
* @param thr The thread to join with.
* @param res If this pointer is not NULL, the function will store the result
* code of the given thread in the integer pointed to by @c res.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int thrd_join(thrd_t thr, int *res);
/** Put the calling thread to sleep.
* Suspend execution of the calling thread.
* @param time_point A point in time at which the thread will resume (absolute time).
* @param remaining If non-NULL, this parameter will hold the remaining time until
* time_point upon return. This will typically be zero, but if
* the thread was woken up by a signal that is not ignored before
* time_point was reached @c remaining will hold a positive
* time.
* @return 0 (zero) on successful sleep, or -1 if an interrupt occurred.
*/
int thrd_sleep(const struct timespec *time_point, struct timespec *remaining);
/** Yield execution to another thread.
* Permit other threads to run, even if the current thread would ordinarily
* continue to run.
*/
void thrd_yield(void);
/* Thread local storage */
#if defined(_TTHREAD_WIN32_)
typedef DWORD tss_t;
#else
typedef pthread_key_t tss_t;
#endif
/** Destructor function for a thread-specific storage.
* @param val The value of the destructed thread-specific storage.
*/
typedef void (*tss_dtor_t)(void *val);
/** Create a thread-specific storage.
* @param key The unique key identifier that will be set if the function is
* successful.
* @param dtor Destructor function. This can be NULL.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
* @note The destructor function is not supported under Windows. If @c dtor is
* not NULL when calling this function under Windows, the function will fail
* and return @ref thrd_error.
*/
int tss_create(tss_t *key, tss_dtor_t dtor);
/** Delete a thread-specific storage.
* The function releases any resources used by the given thread-specific
* storage.
* @param key The key that shall be deleted.
*/
void tss_delete(tss_t key);
/** Get the value for a thread-specific storage.
* @param key The thread-specific storage identifier.
* @return The value for the current thread held in the given thread-specific
* storage.
*/
void *tss_get(tss_t key);
/** Set the value for a thread-specific storage.
* @param key The thread-specific storage identifier.
* @param val The value of the thread-specific storage to set for the current
* thread.
* @return @ref thrd_success on success, or @ref thrd_error if the request could
* not be honored.
*/
int tss_set(tss_t key, void *val);
#endif /* _TINYTHREAD_H_ */

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="fractional_scale_v1">
<copyright>
Copyright © 2022 Kenny Levinsen
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 (including the next
paragraph) 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.
</copyright>
<description summary="Protocol for requesting fractional surface scales">
This protocol allows a compositor to suggest for surfaces to render at
fractional scales.
A client can submit scaled content by utilizing wp_viewport. This is done by
creating a wp_viewport object for the surface and setting the destination
rectangle to the surface size before the scale factor is applied.
The buffer size is calculated by multiplying the surface size by the
intended scale.
The wl_surface buffer scale should remain set to 1.
If a surface has a surface-local size of 100 px by 50 px and wishes to
submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
be used and the wp_viewport destination rectangle should be 100 px by 50 px.
For toplevel surfaces, the size is rounded halfway away from zero. The
rounding algorithm for subsurface position and size is not defined.
</description>
<interface name="wp_fractional_scale_manager_v1" version="1">
<description summary="fractional surface scale information">
A global interface for requesting surfaces to use fractional scales.
</description>
<request name="destroy" type="destructor">
<description summary="unbind the fractional surface scale interface">
Informs the server that the client will not be using this protocol
object anymore. This does not affect any other objects,
wp_fractional_scale_v1 objects included.
</description>
</request>
<enum name="error">
<entry name="fractional_scale_exists" value="0"
summary="the surface already has a fractional_scale object associated"/>
</enum>
<request name="get_fractional_scale">
<description summary="extend surface interface for scale information">
Create an add-on object for the the wl_surface to let the compositor
request fractional scales. If the given wl_surface already has a
wp_fractional_scale_v1 object associated, the fractional_scale_exists
protocol error is raised.
</description>
<arg name="id" type="new_id" interface="wp_fractional_scale_v1"
summary="the new surface scale info interface id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="wp_fractional_scale_v1" version="1">
<description summary="fractional scale interface to a wl_surface">
An additional interface to a wl_surface object which allows the compositor
to inform the client of the preferred scale.
</description>
<request name="destroy" type="destructor">
<description summary="remove surface scale information for surface">
Destroy the fractional scale object. When this object is destroyed,
preferred_scale events will no longer be sent.
</description>
</request>
<event name="preferred_scale">
<description summary="notify of new preferred scale">
Notification of a new preferred scale for this surface that the
compositor suggests that the client should use.
The sent scale is the numerator of a fraction with a denominator of 120.
</description>
<arg name="scale" type="uint" summary="the new preferred scale"/>
</event>
</interface>
</protocol>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="idle_inhibit_unstable_v1">
<copyright>
Copyright © 2015 Samsung Electronics Co., Ltd
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 (including the next
paragraph) 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.
</copyright>
<interface name="zwp_idle_inhibit_manager_v1" version="1">
<description summary="control behavior when display idles">
This interface permits inhibiting the idle behavior such as screen
blanking, locking, and screensaving. The client binds the idle manager
globally, then creates idle-inhibitor objects for each surface.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the idle inhibitor object">
Destroy the inhibit manager.
</description>
</request>
<request name="create_inhibitor">
<description summary="create a new inhibitor object">
Create a new inhibitor object associated with the given surface.
</description>
<arg name="id" type="new_id" interface="zwp_idle_inhibitor_v1"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface that inhibits the idle behavior"/>
</request>
</interface>
<interface name="zwp_idle_inhibitor_v1" version="1">
<description summary="context object for inhibiting idle behavior">
An idle inhibitor prevents the output that the associated surface is
visible on from being set to a state where it is not visually usable due
to lack of user interaction (e.g. blanked, dimmed, locked, set to power
save, etc.) Any screensaver processes are also blocked from displaying.
If the surface is destroyed, unmapped, becomes occluded, loses
visibility, or otherwise becomes not visually relevant for the user, the
idle inhibitor will not be honored by the compositor; if the surface
subsequently regains visibility the inhibitor takes effect once again.
Likewise, the inhibitor isn't honored if the system was already idled at
the time the inhibitor was established, although if the system later
de-idles and re-idles the inhibitor will take effect.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the idle inhibitor object">
Remove the inhibitor effect from the associated wl_surface.
</description>
</request>
</interface>
</protocol>

View File

@ -0,0 +1,339 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="pointer_constraints_unstable_v1">
<copyright>
Copyright © 2014 Jonas Ådahl
Copyright © 2015 Red Hat Inc.
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 (including the next
paragraph) 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.
</copyright>
<description summary="protocol for constraining pointer motions">
This protocol specifies a set of interfaces used for adding constraints to
the motion of a pointer. Possible constraints include confining pointer
motions to a given region, or locking it to its current position.
In order to constrain the pointer, a client must first bind the global
interface "wp_pointer_constraints" which, if a compositor supports pointer
constraints, is exposed by the registry. Using the bound global object, the
client uses the request that corresponds to the type of constraint it wants
to make. See wp_pointer_constraints for more details.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
</description>
<interface name="zwp_pointer_constraints_v1" version="1">
<description summary="constrain the movement of a pointer">
The global interface exposing pointer constraining functionality. It
exposes two requests: lock_pointer for locking the pointer to its
position, and confine_pointer for locking the pointer to a region.
The lock_pointer and confine_pointer requests create the objects
wp_locked_pointer and wp_confined_pointer respectively, and the client can
use these objects to interact with the lock.
For any surface, only one lock or confinement may be active across all
wl_pointer objects of the same seat. If a lock or confinement is requested
when another lock or confinement is active or requested on the same surface
and with any of the wl_pointer objects of the same seat, an
'already_constrained' error will be raised.
</description>
<enum name="error">
<description summary="wp_pointer_constraints error values">
These errors can be emitted in response to wp_pointer_constraints
requests.
</description>
<entry name="already_constrained" value="1"
summary="pointer constraint already requested on that surface"/>
</enum>
<enum name="lifetime">
<description summary="constraint lifetime">
These values represent different lifetime semantics. They are passed
as arguments to the factory requests to specify how the constraint
lifetimes should be managed.
</description>
<entry name="oneshot" value="1">
<description summary="the pointer constraint is defunct once deactivated">
A oneshot pointer constraint will never reactivate once it has been
deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
</description>
</entry>
<entry name="persistent" value="2">
<description summary="the pointer constraint may reactivate">
A persistent pointer constraint may again reactivate once it has
been deactivated. See the corresponding deactivation event
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
details.
</description>
</entry>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the pointer constraints manager object">
Used by the client to notify the server that it will no longer use this
pointer constraints object.
</description>
</request>
<request name="lock_pointer">
<description summary="lock pointer to a position">
The lock_pointer request lets the client request to disable movements of
the virtual pointer (i.e. the cursor), effectively locking the pointer
to a position. This request may not take effect immediately; in the
future, when the compositor deems implementation-specific constraints
are satisfied, the pointer lock will be activated and the compositor
sends a locked event.
The protocol provides no guarantee that the constraints are ever
satisfied, and does not require the compositor to send an error if the
constraints cannot ever be satisfied. It is thus possible to request a
lock that will never activate.
There may not be another pointer constraint of any kind requested or
active on the surface for any of the wl_pointer objects of the seat of
the passed pointer when requesting a lock. If there is, an error will be
raised. See general pointer lock documentation for more details.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the lock to activate. It is up to the compositor whether to
warp the pointer or require some kind of user interaction for the lock
to activate. If the region is null the surface input region is used.
A surface may receive pointer focus without the lock being activated.
The request creates a new object wp_locked_pointer which is used to
interact with the lock as well as receive updates about its state. See
the the description of wp_locked_pointer for further information.
Note that while a pointer is locked, the wl_pointer objects of the
corresponding seat will not emit any wl_pointer.motion events, but
relative motion events will still be emitted via wp_relative_pointer
objects of the same seat. wl_pointer.axis and wl_pointer.button events
are unaffected.
</description>
<arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to lock pointer to"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be locked"/>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
<arg name="lifetime" type="uint" enum="lifetime" summary="lock lifetime"/>
</request>
<request name="confine_pointer">
<description summary="confine pointer to a region">
The confine_pointer request lets the client request to confine the
pointer cursor to a given region. This request may not take effect
immediately; in the future, when the compositor deems implementation-
specific constraints are satisfied, the pointer confinement will be
activated and the compositor sends a confined event.
The intersection of the region passed with this request and the input
region of the surface is used to determine where the pointer must be
in order for the confinement to activate. It is up to the compositor
whether to warp the pointer or require some kind of user interaction for
the confinement to activate. If the region is null the surface input
region is used.
The request will create a new object wp_confined_pointer which is used
to interact with the confinement as well as receive updates about its
state. See the the description of wp_confined_pointer for further
information.
</description>
<arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
<arg name="surface" type="object" interface="wl_surface"
summary="surface to lock pointer to"/>
<arg name="pointer" type="object" interface="wl_pointer"
summary="the pointer that should be confined"/>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
<arg name="lifetime" type="uint" enum="lifetime" summary="confinement lifetime"/>
</request>
</interface>
<interface name="zwp_locked_pointer_v1" version="1">
<description summary="receive relative pointer motion events">
The wp_locked_pointer interface represents a locked pointer state.
While the lock of this object is active, the wl_pointer objects of the
associated seat will not emit any wl_pointer.motion events.
This object will send the event 'locked' when the lock is activated.
Whenever the lock is activated, it is guaranteed that the locked surface
will already have received pointer focus and that the pointer will be
within the region passed to the request creating this object.
To unlock the pointer, send the destroy request. This will also destroy
the wp_locked_pointer object.
If the compositor decides to unlock the pointer the unlocked event is
sent. See wp_locked_pointer.unlock for details.
When unlocking, the compositor may warp the cursor position to the set
cursor position hint. If it does, it will not result in any relative
motion events emitted via wp_relative_pointer.
If the surface the lock was requested on is destroyed and the lock is not
yet activated, the wp_locked_pointer object is now defunct and must be
destroyed.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the locked pointer object">
Destroy the locked pointer object. If applicable, the compositor will
unlock the pointer.
</description>
</request>
<request name="set_cursor_position_hint">
<description summary="set the pointer cursor position hint">
Set the cursor position hint relative to the top left corner of the
surface.
If the client is drawing its own cursor, it should update the position
hint to the position of its own cursor. A compositor may use this
information to warp the pointer upon unlock in order to avoid pointer
jumps.
The cursor position hint is double buffered. The new hint will only take
effect when the associated surface gets it pending state applied. See
wl_surface.commit for details.
</description>
<arg name="surface_x" type="fixed"
summary="surface-local x coordinate"/>
<arg name="surface_y" type="fixed"
summary="surface-local y coordinate"/>
</request>
<request name="set_region">
<description summary="set a new lock region">
Set a new region used to lock the pointer.
The new lock region is double-buffered. The new lock region will
only take effect when the associated surface gets its pending state
applied. See wl_surface.commit for details.
For details about the lock region, see wp_locked_pointer.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
</request>
<event name="locked">
<description summary="lock activation event">
Notification that the pointer lock of the seat's pointer is activated.
</description>
</event>
<event name="unlocked">
<description summary="lock deactivation event">
Notification that the pointer lock of the seat's pointer is no longer
active. If this is a oneshot pointer lock (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer lock (see
wp_pointer_constraints.lifetime) this pointer lock may again
reactivate in the future.
</description>
</event>
</interface>
<interface name="zwp_confined_pointer_v1" version="1">
<description summary="confined pointer object">
The wp_confined_pointer interface represents a confined pointer state.
This object will send the event 'confined' when the confinement is
activated. Whenever the confinement is activated, it is guaranteed that
the surface the pointer is confined to will already have received pointer
focus and that the pointer will be within the region passed to the request
creating this object. It is up to the compositor to decide whether this
requires some user interaction and if the pointer will warp to within the
passed region if outside.
To unconfine the pointer, send the destroy request. This will also destroy
the wp_confined_pointer object.
If the compositor decides to unconfine the pointer the unconfined event is
sent. The wp_confined_pointer object is at this point defunct and should
be destroyed.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the confined pointer object">
Destroy the confined pointer object. If applicable, the compositor will
unconfine the pointer.
</description>
</request>
<request name="set_region">
<description summary="set a new confine region">
Set a new region used to confine the pointer.
The new confine region is double-buffered. The new confine region will
only take effect when the associated surface gets its pending state
applied. See wl_surface.commit for details.
If the confinement is active when the new confinement region is applied
and the pointer ends up outside of newly applied region, the pointer may
warped to a position within the new confinement region. If warped, a
wl_pointer.motion event will be emitted, but no
wp_relative_pointer.relative_motion event.
The compositor may also, instead of using the new region, unconfine the
pointer.
For details about the confine region, see wp_confined_pointer.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"
summary="region of surface"/>
</request>
<event name="confined">
<description summary="pointer confined">
Notification that the pointer confinement of the seat's pointer is
activated.
</description>
</event>
<event name="unconfined">
<description summary="pointer unconfined">
Notification that the pointer confinement of the seat's pointer is no
longer active. If this is a oneshot pointer confinement (see
wp_pointer_constraints.lifetime) this object is now defunct and should
be destroyed. If this is a persistent pointer confinement (see
wp_pointer_constraints.lifetime) this pointer confinement may again
reactivate in the future.
</description>
</event>
</interface>
</protocol>

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="relative_pointer_unstable_v1">
<copyright>
Copyright © 2014 Jonas Ådahl
Copyright © 2015 Red Hat Inc.
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 (including the next
paragraph) 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.
</copyright>
<description summary="protocol for relative pointer motion events">
This protocol specifies a set of interfaces used for making clients able to
receive relative pointer events not obstructed by barriers (such as the
monitor edge or other pointer barriers).
To start receiving relative pointer events, a client must first bind the
global interface "wp_relative_pointer_manager" which, if a compositor
supports relative pointer motion events, is exposed by the registry. After
having created the relative pointer manager proxy object, the client uses
it to create the actual relative pointer object using the
"get_relative_pointer" request given a wl_pointer. The relative pointer
motion events will then, when applicable, be transmitted via the proxy of
the newly created relative pointer object. See the documentation of the
relative pointer interface for more details.
Warning! The protocol described in this file is experimental and backward
incompatible changes may be made. Backward compatible changes may be added
together with the corresponding interface version bump. Backward
incompatible changes are done by bumping the version number in the protocol
and interface names and resetting the interface version. Once the protocol
is to be declared stable, the 'z' prefix and the version number in the
protocol and interface names are removed and the interface version number is
reset.
</description>
<interface name="zwp_relative_pointer_manager_v1" version="1">
<description summary="get relative pointer objects">
A global interface used for getting the relative pointer object for a
given pointer.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the relative pointer manager object">
Used by the client to notify the server that it will no longer use this
relative pointer manager object.
</description>
</request>
<request name="get_relative_pointer">
<description summary="get a relative pointer object">
Create a relative pointer interface given a wl_pointer object. See the
wp_relative_pointer interface for more details.
</description>
<arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/>
<arg name="pointer" type="object" interface="wl_pointer"/>
</request>
</interface>
<interface name="zwp_relative_pointer_v1" version="1">
<description summary="relative pointer object">
A wp_relative_pointer object is an extension to the wl_pointer interface
used for emitting relative pointer events. It shares the same focus as
wl_pointer objects of the same seat and will only emit events when it has
focus.
</description>
<request name="destroy" type="destructor">
<description summary="release the relative pointer object"/>
</request>
<event name="relative_motion">
<description summary="relative pointer motion">
Relative x/y pointer motion from the pointer of the seat associated with
this object.
A relative motion is in the same dimension as regular wl_pointer motion
events, except they do not represent an absolute position. For example,
moving a pointer from (x, y) to (x', y') would have the equivalent
relative motion (x' - x, y' - y). If a pointer motion caused the
absolute pointer position to be clipped by for example the edge of the
monitor, the relative motion is unaffected by the clipping and will
represent the unclipped motion.
This event also contains non-accelerated motion deltas. The
non-accelerated delta is, when applicable, the regular pointer motion
delta as it was before having applied motion acceleration and other
transformations such as normalization.
Note that the non-accelerated delta does not represent 'raw' events as
they were read from some device. Pointer motion acceleration is device-
and configuration-specific and non-accelerated deltas and accelerated
deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events, and can be
sent in combination with such events, but also independently. There may
also be scenarios where wl_pointer.motion is sent, but there is no
relative motion. The order of an absolute and relative motion event
originating from the same physical motion is not guaranteed.
If the client needs button events or focus state, it can receive them
from a wl_pointer object of the same seat that the wp_relative_pointer
object is associated with.
</description>
<arg name="utime_hi" type="uint"
summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/>
<arg name="utime_lo" type="uint"
summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/>
<arg name="dx" type="fixed"
summary="the x component of the motion vector"/>
<arg name="dy" type="fixed"
summary="the y component of the motion vector"/>
<arg name="dx_unaccel" type="fixed"
summary="the x component of the unaccelerated motion vector"/>
<arg name="dy_unaccel" type="fixed"
summary="the y component of the unaccelerated motion vector"/>
</event>
</interface>
</protocol>

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="viewporter">
<copyright>
Copyright © 2013-2016 Collabora, Ltd.
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 (including the next
paragraph) 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.
</copyright>
<interface name="wp_viewporter" version="1">
<description summary="surface cropping and scaling">
The global interface exposing surface cropping and scaling
capabilities is used to instantiate an interface extension for a
wl_surface object. This extended interface will then allow
cropping and scaling the surface contents, effectively
disconnecting the direct relationship between the buffer and the
surface size.
</description>
<request name="destroy" type="destructor">
<description summary="unbind from the cropping and scaling interface">
Informs the server that the client will not be using this
protocol object anymore. This does not affect any other objects,
wp_viewport objects included.
</description>
</request>
<enum name="error">
<entry name="viewport_exists" value="0"
summary="the surface already has a viewport object associated"/>
</enum>
<request name="get_viewport">
<description summary="extend surface interface for crop and scale">
Instantiate an interface extension for the given wl_surface to
crop and scale its content. If the given wl_surface already has
a wp_viewport object associated, the viewport_exists
protocol error is raised.
</description>
<arg name="id" type="new_id" interface="wp_viewport"
summary="the new viewport interface id"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the surface"/>
</request>
</interface>
<interface name="wp_viewport" version="1">
<description summary="crop and scale interface to a wl_surface">
An additional interface to a wl_surface object, which allows the
client to specify the cropping and scaling of the surface
contents.
This interface works with two concepts: the source rectangle (src_x,
src_y, src_width, src_height), and the destination size (dst_width,
dst_height). The contents of the source rectangle are scaled to the
destination size, and content outside the source rectangle is ignored.
This state is double-buffered, and is applied on the next
wl_surface.commit.
The two parts of crop and scale state are independent: the source
rectangle, and the destination size. Initially both are unset, that
is, no scaling is applied. The whole of the current wl_buffer is
used as the source, and the surface size is as defined in
wl_surface.attach.
If the destination size is set, it causes the surface size to become
dst_width, dst_height. The source (rectangle) is scaled to exactly
this size. This overrides whatever the attached wl_buffer size is,
unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
has no content and therefore no size. Otherwise, the size is always
at least 1x1 in surface local coordinates.
If the source rectangle is set, it defines what area of the wl_buffer is
taken as the source. If the source rectangle is set and the destination
size is not set, then src_width and src_height must be integers, and the
surface size becomes the source rectangle size. This results in cropping
without scaling. If src_width or src_height are not integers and
destination size is not set, the bad_size protocol error is raised when
the surface state is applied.
The coordinate transformations from buffer pixel coordinates up to
the surface-local coordinates happen in the following order:
1. buffer_transform (wl_surface.set_buffer_transform)
2. buffer_scale (wl_surface.set_buffer_scale)
3. crop and scale (wp_viewport.set*)
This means, that the source rectangle coordinates of crop and scale
are given in the coordinates after the buffer transform and scale,
i.e. in the coordinates that would be the surface-local coordinates
if the crop and scale was not applied.
If src_x or src_y are negative, the bad_value protocol error is raised.
Otherwise, if the source rectangle is partially or completely outside of
the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
when the surface state is applied. A NULL wl_buffer does not raise the
out_of_buffer error.
If the wl_surface associated with the wp_viewport is destroyed,
all wp_viewport requests except 'destroy' raise the protocol error
no_surface.
If the wp_viewport object is destroyed, the crop and scale
state is removed from the wl_surface. The change will be applied
on the next wl_surface.commit.
</description>
<request name="destroy" type="destructor">
<description summary="remove scaling and cropping from the surface">
The associated wl_surface's crop and scale state is removed.
The change is applied on the next wl_surface.commit.
</description>
</request>
<enum name="error">
<entry name="bad_value" value="0"
summary="negative or zero values in width or height"/>
<entry name="bad_size" value="1"
summary="destination size is not integer"/>
<entry name="out_of_buffer" value="2"
summary="source rectangle extends outside of the content area"/>
<entry name="no_surface" value="3"
summary="the wl_surface was destroyed"/>
</enum>
<request name="set_source">
<description summary="set the source rectangle for cropping">
Set the source rectangle of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If all of x, y, width and height are -1.0, the source rectangle is
unset instead. Any other set of values where width or height are zero
or negative, or x or y are negative, raise the bad_value protocol
error.
The crop and scale state is double-buffered state, and will be
applied on the next wl_surface.commit.
</description>
<arg name="x" type="fixed" summary="source rectangle x"/>
<arg name="y" type="fixed" summary="source rectangle y"/>
<arg name="width" type="fixed" summary="source rectangle width"/>
<arg name="height" type="fixed" summary="source rectangle height"/>
</request>
<request name="set_destination">
<description summary="set the surface size for scaling">
Set the destination size of the associated wl_surface. See
wp_viewport for the description, and relation to the wl_buffer
size.
If width is -1 and height is -1, the destination size is unset
instead. Any other pair of values for width and height that
contains zero or negative values raises the bad_value protocol
error.
The crop and scale state is double-buffered state, and will be
applied on the next wl_surface.commit.
</description>
<arg name="width" type="int" summary="surface width"/>
<arg name="height" type="int" summary="surface height"/>
</request>
</interface>
</protocol>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_activation_v1">
<copyright>
Copyright © 2020 Aleix Pol Gonzalez &lt;aleixpol@kde.org&gt;
Copyright © 2020 Carlos Garnacho &lt;carlosg@gnome.org&gt;
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 (including the next
paragraph) 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.
</copyright>
<description summary="Protocol for requesting activation of surfaces">
The way for a client to pass focus to another toplevel is as follows.
The client that intends to activate another toplevel uses the
xdg_activation_v1.get_activation_token request to get an activation token.
This token is then forwarded to the client, which is supposed to activate
one of its surfaces, through a separate band of communication.
One established way of doing this is through the XDG_ACTIVATION_TOKEN
environment variable of a newly launched child process. The child process
should unset the environment variable again right after reading it out in
order to avoid propagating it to other child processes.
Another established way exists for Applications implementing the D-Bus
interface org.freedesktop.Application, which should get their token under
activation-token on their platform_data.
In general activation tokens may be transferred across clients through
means not described in this protocol.
The client to be activated will then pass the token
it received to the xdg_activation_v1.activate request. The compositor can
then use this token to decide how to react to the activation request.
The token the activating client gets may be ineffective either already at
the time it receives it, for example if it was not focused, for focus
stealing prevention. The activating client will have no way to discover
the validity of the token, and may still forward it to the to be activated
client.
The created activation token may optionally get information attached to it
that can be used by the compositor to identify the application that we
intend to activate. This can for example be used to display a visual hint
about what application is being started.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can
only be done by creating a new major version of the extension.
</description>
<interface name="xdg_activation_v1" version="1">
<description summary="interface for activating surfaces">
A global interface used for informing the compositor about applications
being activated or started, or for applications to request to be
activated.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the xdg_activation object">
Notify the compositor that the xdg_activation object will no longer be
used.
The child objects created via this interface are unaffected and should
be destroyed separately.
</description>
</request>
<request name="get_activation_token">
<description summary="requests a token">
Creates an xdg_activation_token_v1 object that will provide
the initiating client with a unique token for this activation. This
token should be offered to the clients to be activated.
</description>
<arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
</request>
<request name="activate">
<description summary="notify new interaction being available">
Requests surface activation. It's up to the compositor to display
this information as desired, for example by placing the surface above
the rest.
The compositor may know who requested this by checking the activation
token and might decide not to follow through with the activation if it's
considered unwanted.
Compositors can ignore unknown activation tokens when an invalid
token is passed.
</description>
<arg name="token" type="string" summary="the activation token of the initiating client"/>
<arg name="surface" type="object" interface="wl_surface"
summary="the wl_surface to activate"/>
</request>
</interface>
<interface name="xdg_activation_token_v1" version="1">
<description summary="an exported activation handle">
An object for setting up a token and receiving a token handle that can
be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token
request. This object should then be populated with the app_id, surface
and serial information and committed. The compositor shall then issue a
done event with the token. In case the request's parameters are invalid,
the compositor will provide an invalid token.
</description>
<enum name="error">
<entry name="already_used" value="0"
summary="The token has already been used previously"/>
</enum>
<request name="set_serial">
<description summary="specifies the seat and serial of the activating event">
Provides information about the seat and serial event that requested the
token.
The serial can come from an input or focus event. For instance, if a
click triggers the launch of a third-party client, the launcher client
should send a set_serial request with the serial and seat from the
wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token
doesn't have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
</description>
<arg name="serial" type="uint"
summary="the serial of the event that triggered the activation"/>
<arg name="seat" type="object" interface="wl_seat"
summary="the wl_seat of the event"/>
</request>
<request name="set_app_id">
<description summary="specifies the application being activated">
The requesting client can specify an app_id to associate the token
being created with it.
Must be sent before commit. This information is optional.
</description>
<arg name="app_id" type="string"
summary="the application id of the client being activated."/>
</request>
<request name="set_surface">
<description summary="specifies the surface requesting activation">
This request sets the surface requesting the activation. Note, this is
different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token
doesn't have a requesting surface.
Must be sent before commit. This information is optional.
</description>
<arg name="surface" type="object" interface="wl_surface"
summary="the requesting surface"/>
</request>
<request name="commit">
<description summary="issues the token request">
Requests an activation token based on the different parameters that
have been offered through set_serial, set_surface and set_app_id.
</description>
</request>
<event name="done">
<description summary="the exported activation token">
The 'done' event contains the unique token of this activation request
and notifies that the provider is done.
</description>
<arg name="token" type="string" summary="the exported activation token"/>
</event>
<request name="destroy" type="destructor">
<description summary="destroy the xdg_activation_token_v1 object">
Notify the compositor that the xdg_activation_token_v1 object will no
longer be used. The received token stays valid.
</description>
</request>
</interface>
</protocol>

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="xdg_decoration_unstable_v1">
<copyright>
Copyright © 2018 Simon Ser
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 (including the next
paragraph) 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.
</copyright>
<interface name="zxdg_decoration_manager_v1" version="1">
<description summary="window decoration manager">
This interface allows a compositor to announce support for server-side
decorations.
A window decoration is a set of window controls as deemed appropriate by
the party managing them, such as user interface components used to move,
resize and change a window's state.
A client can use this protocol to request being decorated by a supporting
compositor.
If compositor and client do not negotiate the use of a server-side
decoration using this protocol, clients continue to self-decorate as they
see fit.
Warning! The protocol described in this file is experimental and
backward incompatible changes may be made. Backward compatible changes
may be added together with the corresponding interface version bump.
Backward incompatible changes are done by bumping the version number in
the protocol and interface names and resetting the interface version.
Once the protocol is to be declared stable, the 'z' prefix and the
version number in the protocol and interface names are removed and the
interface version number is reset.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the decoration manager object">
Destroy the decoration manager. This doesn't destroy objects created
with the manager.
</description>
</request>
<request name="get_toplevel_decoration">
<description summary="create a new toplevel decoration object">
Create a new decoration object associated with the given toplevel.
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
buffer attached or committed is a client error, and any attempts by a
client to attach or manipulate a buffer prior to the first
xdg_toplevel_decoration.configure event must also be treated as
errors.
</description>
<arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
</request>
</interface>
<interface name="zxdg_toplevel_decoration_v1" version="1">
<description summary="decoration object for a toplevel surface">
The decoration object allows the compositor to toggle server-side window
decorations for a toplevel surface. The client can request to switch to
another mode.
The xdg_toplevel_decoration object must be destroyed before its
xdg_toplevel.
</description>
<enum name="error">
<entry name="unconfigured_buffer" value="0"
summary="xdg_toplevel has a buffer attached before configure"/>
<entry name="already_constructed" value="1"
summary="xdg_toplevel already has a decoration object"/>
<entry name="orphaned" value="2"
summary="xdg_toplevel destroyed before the decoration object"/>
</enum>
<request name="destroy" type="destructor">
<description summary="destroy the decoration object">
Switch back to a mode without any server-side decorations at the next
commit.
</description>
</request>
<enum name="mode">
<description summary="window decoration modes">
These values describe window decoration modes.
</description>
<entry name="client_side" value="1"
summary="no server-side window decoration"/>
<entry name="server_side" value="2"
summary="server-side window decoration"/>
</enum>
<request name="set_mode">
<description summary="set the decoration mode">
Set the toplevel surface decoration mode. This informs the compositor
that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by
emitting an xdg_surface.configure event. The client should then update
its content, drawing it without decorations if the received mode is
server-side decorations. The client must also acknowledge the configure
when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a
different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send
a set_mode request in response to an xdg_surface.configure event and wait
for the next xdg_surface.configure event to prevent unwanted state.
Such clients are responsible for preventing configure loops and must
make sure not to send multiple successive set_mode requests with the
same decoration mode.
</description>
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
</request>
<request name="unset_mode">
<description summary="unset the decoration mode">
Unset the toplevel surface decoration mode. This informs the compositor
that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode.
</description>
</request>
<event name="configure">
<description summary="suggest a surface change">
The configure event asks the client to change its decoration mode. The
configured state should not be applied immediately. Clients must send an
ack_configure in response to this event. See xdg_surface.configure and
xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be
obeyed by the client.
</description>
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
</event>
</interface>
</protocol>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
# NOTE: The order of this list determines the order of items in the Guides
# (i.e. Pages) list in the generated documentation
set(source_files
main.md
news.md
quick.md
moving.md
compile.md
build.md
intro.md
context.md
monitor.md
window.md
input.md
vulkan.md
compat.md
internal.md)
set(extra_files DoxygenLayout.xml header.html footer.html extra.css spaces.svg)
set(header_paths
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h"
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h")
# Format the source list into a Doxyfile INPUT value that Doxygen can parse
foreach(path IN LISTS header_paths)
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${path}\"")
endforeach()
foreach(file IN LISTS source_files)
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"")
endforeach()
set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
if (NOT DOXYGEN_FOUND OR DOXYGEN_VERSION VERSION_LESS "1.9.8")
message(STATUS "Documentation generation requires Doxygen 1.9.8 or later")
else()
configure_file(Doxyfile.in Doxyfile @ONLY)
add_custom_command(OUTPUT "html/index.html"
COMMAND "${DOXYGEN_EXECUTABLE}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
MAIN_DEPENDENCY Doxyfile
DEPENDS ${header_paths} ${source_files} ${extra_files}
COMMENT "Generating HTML documentation"
VERBATIM)
add_custom_target(docs ALL SOURCES "html/index.html")
set_target_properties(docs PROPERTIES FOLDER "GLFW3")
if (GLFW_INSTALL)
install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
endif()
endif()

View File

@ -0,0 +1,390 @@
# Contribution Guide
## Contents
- [Asking a question](#asking-a-question)
- [Reporting a bug](#reporting-a-bug)
- [Reporting a compile or link bug](#reporting-a-compile-or-link-bug)
- [Reporting a segfault or other crash bug](#reporting-a-segfault-or-other-crash-bug)
- [Reporting a context creation bug](#reporting-a-context-creation-bug)
- [Reporting a monitor or video mode bug](#reporting-a-monitor-or-video-mode-bug)
- [Reporting a window, input or event bug](#reporting-a-window-input-or-event-bug)
- [Reporting some other library bug](#reporting-some-other-library-bug)
- [Reporting a documentation bug](#reporting-a-documentation-bug)
- [Reporting a website bug](#reporting-a-website-bug)
- [Requesting a feature](#requesting-a-feature)
- [Contributing a bug fix](#contributing-a-bug-fix)
- [Contributing a feature](#contributing-a-feature)
## Asking a question
Questions about how to use GLFW should be asked either in the [support
section](https://discourse.glfw.org/c/support) of the forum, under the [Stack
Overflow tag](https://stackoverflow.com/questions/tagged/glfw) or [Game
Development tag](https://gamedev.stackexchange.com/questions/tagged/glfw) on
Stack Exchange.
Questions about the design or implementation of GLFW or about future plans
should be asked in the [dev section](https://discourse.glfw.org/c/dev) of the
forum. Please don't open a GitHub issue to discuss design questions without
first checking with a maintainer.
## Reporting a bug
If GLFW is behaving unexpectedly at run-time, start by setting an [error
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling).
GLFW will often tell you the cause of an error via this callback. If it
doesn't, that might be a separate bug.
If GLFW is crashing or triggering asserts, make sure that all your object
handles and other pointers are valid.
For bugs where it makes sense, a short, self contained example is absolutely
invaluable. Just put it inline in the body text. Note that if the bug is
reproducible with one of the test programs that come with GLFW, just mention
that instead.
__Don't worry about adding too much information__. Unimportant information can
be abbreviated or removed later, but missing information can stall bug fixing,
especially when your schedule doesn't align with that of the maintainer.
__Please provide text as text, not as images__. This includes code, error
messages and any other text. Text in images cannot be found by other users
searching for the same problem and may have to be re-typed by maintainers when
debugging.
You don't need to manually indent your code or other text to quote it with
GitHub Markdown; just surround it with triple backticks:
```
Some quoted text.
```
You can also add syntax highlighting by appending the common file extension:
```c
int five(void)
{
return 5;
}
```
There are issue labels for both platforms and GPU manufacturers, so there is no
need to mention these in the subject line. If you do, it will be removed when
the issue is labeled.
If your bug is already reported, please add any new information you have, or if
it already has everything, give it a :+1:.
### Reporting a compile or link bug
__Note:__ GLFW needs many system APIs to do its job, which on some platforms
means linking to many system libraries. If you are using GLFW as a static
library, that means your application needs to link to these in addition to GLFW.
__Note:__ Check the [Compiling
GLFW](https://www.glfw.org/docs/latest/compile.html) guide and or [Building
applications](https://www.glfw.org/docs/latest/build.html) guide for before
opening an issue of this kind. Most issues are caused by a missing package or
linker flag.
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`) and the __compiler name and version__ (e.g. `Visual
C++ 2015 Update 2`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
Please also include the __complete build log__ from your compiler and linker,
even if it's long. It can always be shortened later, if necessary.
#### Quick template
```
OS and version:
Compiler version:
Release or commit:
Build log:
```
### Reporting a segfault or other crash bug
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
Please also include any __error messages__ provided to your application via the
[error
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
the __full call stack__ of the crash, or if the crash does not occur in debug
mode, mention that instead.
#### Quick template
```
OS and version:
Release or commit:
Error messages:
Call stack:
```
### Reporting a context creation bug
__Note:__ Windows ships with graphics drivers that do not support OpenGL. If
GLFW says that your machine lacks support for OpenGL, it very likely does.
Install drivers from the computer manufacturer or graphics card manufacturer
([Nvidia](https://www.geforce.com/drivers),
[AMD](https://www.amd.com/en/support),
[Intel](https://www-ssl.intel.com/content/www/us/en/support/detect.html)) to
fix this.
__Note:__ AMD only supports OpenGL ES on Windows via EGL. See the
[GLFW\_CONTEXT\_CREATION\_API](https://www.glfw.org/docs/latest/window_guide.html#window_hints_ctx)
hint for how to select EGL.
Please verify that context creation also fails with the `glfwinfo` tool before
reporting it as a bug. This tool is included in the GLFW source tree as
`tests/glfwinfo.c` and is built along with the library. It has switches for all
GLFW context and framebuffer hints. Run `glfwinfo -h` for a complete list.
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
If you are running your program in a virtual machine, please mention this and
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
Please also include the __GLFW version string__ (`3.2.0 X11 EGL clock_gettime
/dev/js`), as described
[here](https://www.glfw.org/docs/latest/intro.html#intro_version_string), the
__GPU model and driver version__ (e.g. `GeForce GTX660 with 352.79`), and the
__output of `glfwinfo`__ (with switches matching any hints you set in your
code) when reporting this kind of bug. If this tool doesn't run on the machine,
mention that instead.
#### Quick template
```
OS and version:
GPU and driver:
Release or commit:
Version string:
glfwinfo output:
```
### Reporting a monitor or video mode bug
__Note:__ On headless systems on some platforms, no monitors are reported. This
causes glfwGetPrimaryMonitor to return `NULL`, which not all applications are
prepared for.
__Note:__ Some third-party tools report more video modes than are approved of
by the OS. For safety and compatibility, GLFW only reports video modes the OS
wants programs to use. This is not a bug.
The `monitors` tool is included in the GLFW source tree as `tests/monitors.c`
and is built along with the library. It lists all information GLFW provides
about monitors it detects.
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
If you are running your program in a virtual machine, please mention this and
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
Please also include any __error messages__ provided to your application via the
[error
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
the __output of `monitors`__ when reporting this kind of bug. If this tool
doesn't run on the machine, mention this instead.
#### Quick template
```
OS and version:
Release or commit:
Error messages:
monitors output:
```
### Reporting a window, input or event bug
__Note:__ The exact ordering of related window events will sometimes differ.
__Note:__ Window moving and resizing (by the user) will block the main thread on
some platforms. This is not a bug. Set a [refresh
callback](https://www.glfw.org/docs/latest/window.html#window_refresh) if you
want to keep the window contents updated during a move or size operation.
The `events` tool is included in the GLFW source tree as `tests/events.c` and is
built along with the library. It prints all information provided to every
callback supported by GLFW as events occur. Each event is listed with the time
and a unique number to make discussions about event logs easier. The tool has
command-line options for creating multiple windows and full screen windows.
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
If you are running your program in a virtual machine, please mention this and
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
Please also include any __error messages__ provided to your application via the
[error
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
if relevant, the __output of `events`__ when reporting this kind of bug. If
this tool doesn't run on the machine, mention this instead.
__X11:__ If possible, please include what desktop environment (e.g. GNOME,
Unity, KDE) and/or window manager (e.g. Openbox, dwm, Window Maker) you are
running. If the bug is related to keyboard input, please include any input
method (e.g. ibus, SCIM) you are using.
#### Quick template
```
OS and version:
Release or commit:
Error messages:
events output:
```
### Reporting some other library bug
Always include the __operating system name and version__ (e.g. `Windows
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
Please also include any __error messages__ provided to your application via the
[error
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling), if
relevant.
#### Quick template
```
OS and version:
Release or commit:
Error messages:
```
### Reporting a documentation bug
If you found a bug in the documentation, including this file, then it's fine to
just link to that web page or mention that source file. You don't need to match
the source to the output or vice versa.
### Reporting a website bug
If the bug is in the documentation (anything under `/docs/`) then please see the
section above. Bugs in the rest of the site are reported to the [website
source repository](https://github.com/glfw/website/issues).
## Requesting a feature
Please explain why you need the feature and how you intend to use it. If you
have a specific API design in mind, please add that as well. If you have or are
planning to write code for the feature, see the section below.
If there already is a request for the feature you need, add your specific use
case unless it is already mentioned. If it is, give it a :+1:.
## Contributing a bug fix
__Note:__ You must have all necessary [intellectual
property rights](https://en.wikipedia.org/wiki/Intellectual_property) to any
code you contribute. If you did not write the code yourself, you must explain
where it came from and under what license you received it. Even code using the
same license as GLFW may not be copied without attribution.
__There is no preferred patch size__. A one character fix is just as welcome as
a thousand line one, if that is the appropriate size for the fix.
In addition to the code, a complete bug fix includes:
- Change log entry in `README.md`, describing the incorrect behavior
- Credits entries in `CONTRIBUTORS.md` for all authors of the bug fix
Bug fixes will not be rejected because they don't include all the above parts,
but please keep in mind that maintainer time is finite and that there are many
other bugs and features to work on.
If the patch fixes a bug introduced after the last release, it should not get
a change log entry.
If you haven't already, read the excellent article [How to Write a Git Commit
Message](https://chris.beams.io/posts/git-commit/).
## Contributing a feature
__Note:__ You must have all necessary rights to any code you contribute. If you
did not write the code yourself, you must explain where it came from and under
what license. Even code using the same license as GLFW may not be copied
without attribution.
__Note:__ If you haven't already implemented the feature, check first if there
already is an open issue for it and if it's already being developed in an
[experimental branch](https://github.com/glfw/glfw/branches/all).
__There is no preferred patch size__. A one-character change is just as welcome
as one adding a thousand lines, if that is the appropriate size for the
feature.
In addition to the code, a complete feature includes:
- Change log entry in `README.md`, listing all new symbols
- News page entry in `docs/news.md`, briefly describing the feature
- Guide documentation, with minimal examples, in the relevant guide in the `docs` folder
- Reference documentation, with all applicable tags
- Cross-references and mentions in appropriate places
- Credits entries in `CONTRIBUTORS.md` for all authors of the feature
If the feature requires platform-specific code, at minimum stubs must be added
for the new platform function to all supported and experimental platforms.
If it adds a new callback, support for it must be added to `tests/event.c`.
If it adds a new monitor property, support for it must be added to
`tests/monitor.c`.
If it adds a new OpenGL, OpenGL ES or Vulkan option or extension, support
for it must be added to `tests/glfwinfo.c` and the behavior of the library when
the extension is missing documented in `docs/compat.md`.
If you haven't already, read the excellent article [How to Write a Git Commit
Message](https://chris.beams.io/posts/git-commit/).
Features will not be rejected because they don't include all the above parts,
but please keep in mind that maintainer time is finite and that there are many
other features and bugs to work on.
Please also keep in mind that any part of the public API that has been included
in a release cannot be changed until the next _major_ version. Features can be
added and existing parts can sometimes be overloaded (in the general sense of
doing more things, not in the C++ sense), but code written to the API of one
minor release should both compile and run on subsequent minor releases.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.14 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title="Introduction"/>
<tab type="user" url="quick_guide.html" title="Tutorial"/>
<tab type="pages" visible="yes" title="Guides" intro=""/>
<tab type="topics" visible="yes" title="Reference" intro=""/>
<tab type="filelist" visible="yes" title="Files"/>
</navindex>
<!-- Layout definition for a file page -->
<file>
<detaileddescription title="Description"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<sourcelink visible="yes"/>
<memberdecl>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<detaileddescription title="Description"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
</memberdecl>
<memberdef>
<pagedocs/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

View File

@ -0,0 +1,13 @@
# Support resources
See the [latest documentation](https://www.glfw.org/docs/latest/) for tutorials,
guides and the API reference.
If you have questions about using GLFW, we have a
[forum](https://discourse.glfw.org/).
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
Please check the [contribution
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
information on what to include when reporting a bug.

View File

@ -0,0 +1,419 @@
# Building applications {#build_guide}
[TOC]
This is about compiling and linking applications that use GLFW. For information on
how to write such applications, start with the
[introductory tutorial](@ref quick_guide). For information on how to compile
the GLFW library itself, see @ref compile_guide.
This is not a tutorial on compilation or linking. It assumes basic
understanding of how to compile and link a C program as well as how to use the
specific compiler of your chosen development environment. The compilation
and linking process should be explained in your C programming material and in
the documentation for your development environment.
## Including the GLFW header file {#build_include}
You should include the GLFW header in the source files where you use OpenGL or
GLFW.
```c
#include <GLFW/glfw3.h>
```
This header defines all the constants and declares all the types and function
prototypes of the GLFW API. By default, it also includes the OpenGL header from
your development environment. See [option macros](@ref build_macros) below for
how to select OpenGL ES headers and more.
The GLFW header also defines any platform-specific macros needed by your OpenGL
header, so that it can be included without needing any window system headers.
It does this only when needed, so if window system headers are included, the
GLFW header does not try to redefine those symbols. The reverse is not true,
i.e. `windows.h` cannot cope if any Win32 symbols have already been defined.
In other words:
- Use the GLFW header to include OpenGL or OpenGL ES headers portably
- Do not include window system headers unless you will use those APIs directly
- If you do need such headers, include them before the GLFW header
If you are using an OpenGL extension loading library such as [glad][], the
extension loader header should be included before the GLFW one. GLFW attempts
to detect any OpenGL or OpenGL ES header or extension loader header included
before it and will then disable the inclusion of the default OpenGL header.
Most extension loaders also define macros that disable similar headers below it.
[glad]: https://github.com/Dav1dde/glad
```c
#include <glad/gl.h>
#include <GLFW/glfw3.h>
```
Both of these mechanisms depend on the extension loader header defining a known
macro. If yours doesn't or you don't know which one your users will pick, the
@ref GLFW_INCLUDE_NONE macro will explicitly prevent the GLFW header from
including the OpenGL header. This will also allow you to include the two
headers in any order.
```c
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <glad/gl.h>
```
### GLFW header option macros {#build_macros}
These macros may be defined before the inclusion of the GLFW header and affect
its behavior.
@anchor GLFW_DLL
__GLFW_DLL__ is required on Windows when using the GLFW DLL, to tell the
compiler that the GLFW functions are defined in a DLL.
The following macros control which OpenGL or OpenGL ES API header is included.
Only one of these may be defined at a time.
@note GLFW does not provide any of the API headers mentioned below. They are
provided by your development environment or your OpenGL, OpenGL ES or Vulkan
SDK, and most of them can be downloaded from the [Khronos Registry][registry].
[registry]: https://www.khronos.org/registry/
@anchor GLFW_INCLUDE_GLCOREARB
__GLFW_INCLUDE_GLCOREARB__ makes the GLFW header include the modern
`GL/glcorearb.h` header (`OpenGL/gl3.h` on macOS) instead of the regular OpenGL
header.
@anchor GLFW_INCLUDE_ES1
__GLFW_INCLUDE_ES1__ makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`
header instead of the regular OpenGL header.
@anchor GLFW_INCLUDE_ES2
__GLFW_INCLUDE_ES2__ makes the GLFW header include the OpenGL ES 2.0
`GLES2/gl2.h` header instead of the regular OpenGL header.
@anchor GLFW_INCLUDE_ES3
__GLFW_INCLUDE_ES3__ makes the GLFW header include the OpenGL ES 3.0
`GLES3/gl3.h` header instead of the regular OpenGL header.
@anchor GLFW_INCLUDE_ES31
__GLFW_INCLUDE_ES31__ makes the GLFW header include the OpenGL ES 3.1
`GLES3/gl31.h` header instead of the regular OpenGL header.
@anchor GLFW_INCLUDE_ES32
__GLFW_INCLUDE_ES32__ makes the GLFW header include the OpenGL ES 3.2
`GLES3/gl32.h` header instead of the regular OpenGL header.
@anchor GLFW_INCLUDE_NONE
__GLFW_INCLUDE_NONE__ makes the GLFW header not include any OpenGL or OpenGL ES
API header. This is useful in combination with an extension loading library.
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
header (`OpenGL/gl.h` on macOS) is included, unless GLFW detects the inclusion
guards of any OpenGL, OpenGL ES or extension loader header it knows about.
The following macros control the inclusion of additional API headers. Any
number of these may be defined simultaneously, and/or together with one of the
above macros.
@anchor GLFW_INCLUDE_VULKAN
__GLFW_INCLUDE_VULKAN__ makes the GLFW header include the Vulkan
`vulkan/vulkan.h` header in addition to any selected OpenGL or OpenGL ES header.
@anchor GLFW_INCLUDE_GLEXT
__GLFW_INCLUDE_GLEXT__ makes the GLFW header include the appropriate extension
header for the OpenGL or OpenGL ES header selected above after and in addition
to that header.
@anchor GLFW_INCLUDE_GLU
__GLFW_INCLUDE_GLU__ makes the header include the GLU header in addition to the
header selected above. This should only be used with the standard OpenGL header
and only for compatibility with legacy code. GLU has been deprecated and should
not be used in new code.
@note None of these macros may be defined during the compilation of GLFW itself.
If your build includes GLFW and you define any these in your build files, make
sure they are not applied to the GLFW sources.
## Link with the right libraries {#build_link}
GLFW is essentially a wrapper of various platform-specific APIs and therefore
needs to link against many different system libraries. If you are using GLFW as
a shared library / dynamic library / DLL then it takes care of these links.
However, if you are using GLFW as a static library then your executable will
need to link against these libraries.
On Windows and macOS, the list of system libraries is static and can be
hard-coded into your build environment. See the section for your development
environment below. On Linux and other Unix-like operating systems, the list
varies but can be retrieved in various ways as described below.
A good general introduction to linking is [Beginner's Guide to
Linkers][linker_guide] by David Drysdale.
[linker_guide]: https://www.lurklurk.org/linkers/linkers.html
### With Visual C++ and GLFW binaries {#build_link_win32}
If you are using a downloaded [binary
archive](https://www.glfw.org/download.html), first make sure you have the
archive matching the architecture you are building for (32-bit or 64-bit), or
you will get link errors. Also make sure you are using the binaries for your
version of Visual C++ or you may get other link errors.
There are two version of the static GLFW library in the binary archive, because
it needs to use the same base run-time library variant as the rest of your
executable.
One is named `glfw3.lib` and is for projects with the _Runtime Library_ project
option set to _Multi-threaded DLL_ or _Multi-threaded Debug DLL_. The other is
named `glfw3_mt.lib` and is for projects with _Runtime Library_ set to
_Multi-threaded_ or _Multi-threaded Debug_. To use the static GLFW library you
will need to add `path/to/glfw3.lib` or `path/to/glfw3_mt.lib` to the
_Additional Dependencies_ project option.
If you compiled a GLFW static library yourself then there will only be one,
named `glfw3.lib`, and you have to make sure the run-time library variant
matches.
The DLL version of the GLFW library is named `glfw3.dll`, but you will be
linking against the `glfw3dll.lib` link library. To use the DLL you will need
to add `path/to/glfw3dll.lib` to the _Additional Dependencies_ project option.
All of its dependencies are already listed there by default, but when building
with the DLL version of GLFW, you also need to define the @ref GLFW_DLL. This
can be done either in the _Preprocessor Definitions_ project option or by
defining it in your source code before including the GLFW header.
```c
#define GLFW_DLL
#include <GLFW/glfw3.h>
```
All link-time dependencies for GLFW are already listed in the _Additional
Dependencies_ option by default.
### With MinGW-w64 and GLFW binaries {#build_link_mingw}
This is intended for building a program from the command-line or by writing
a makefile, on Windows with [MinGW-w64][] and GLFW binaries. These can be from
a downloaded and extracted [binary archive](https://www.glfw.org/download.html)
or by compiling GLFW yourself. The paths below assume a binary archive is used.
If you are using a downloaded binary archive, first make sure you have the
archive matching the architecture you are building for (32-bit or 64-bit) or you
will get link errors.
Note that the order of source files and libraries matter for GCC. Dependencies
must be listed after the files that depend on them. Any source files that
depend on GLFW must be listed before the GLFW library. GLFW in turn depends on
`gdi32` and must be listed before it.
[MinGW-w64]: https://www.mingw-w64.org/
If you are using the static version of the GLFW library, which is named
`libglfw3.a`, do:
```sh
gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3.a -lgdi32
```
If you are using the DLL version of the GLFW library, which is named
`glfw3.dll`, you will need to use the `libglfw3dll.a` link library.
```sh
gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32
```
The resulting executable will need to find `glfw3.dll` to run, typically by
keeping both files in the same directory.
When you are building with the DLL version of GLFW, you will also need to define
the @ref GLFW_DLL macro. This can be done in your source files, as long as it
done before including the GLFW header:
```c
#define GLFW_DLL
#include <GLFW/glfw3.h>
```
It can also be done on the command-line:
```sh
gcc -o myprog myprog.c -D GLFW_DLL -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32
```
### With CMake and GLFW source {#build_link_cmake_source}
This section is about using CMake to compile and link GLFW along with your
application. If you want to use an installed binary instead, see @ref
build_link_cmake_package.
With a few changes to your `CMakeLists.txt` you can have the GLFW source tree
built along with your application.
Add the root directory of the GLFW source tree to your project. This will add
the `glfw` target to your project.
```cmake
add_subdirectory(path/to/glfw)
```
Once GLFW has been added, link your application against the `glfw` target.
This adds the GLFW library and its link-time dependencies as it is currently
configured, the include directory for the GLFW header and, when applicable, the
@ref GLFW_DLL macro.
```cmake
target_link_libraries(myapp glfw)
```
Note that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,
OpenGL ES or Vulkan libraries it needs at runtime. If your application calls
OpenGL directly, instead of using a modern
[extension loader library](@ref context_glext_auto), use the OpenGL CMake
package.
```cmake
find_package(OpenGL REQUIRED)
```
If OpenGL is found, the `OpenGL::GL` target is added to your project, containing
library and include directory paths. Link against this like any other library.
```cmake
target_link_libraries(myapp OpenGL::GL)
```
For a minimal example of a program and GLFW sources built with CMake, see the
[GLFW CMake Starter][cmake_starter] on GitHub.
[cmake_starter]: https://github.com/juliettef/GLFW-CMake-starter
### With CMake and installed GLFW binaries {#build_link_cmake_package}
This section is about using CMake to link GLFW after it has been built and
installed. If you want to build it along with your application instead, see
@ref build_link_cmake_source.
With a few changes to your `CMakeLists.txt` you can locate the package and
target files generated when GLFW is installed.
```cmake
find_package(glfw3 3.4 REQUIRED)
```
Once GLFW has been added to the project, link against it with the `glfw` target.
This adds the GLFW library and its link-time dependencies, the include directory
for the GLFW header and, when applicable, the @ref GLFW_DLL macro.
```cmake
target_link_libraries(myapp glfw)
```
Note that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,
OpenGL ES or Vulkan libraries it needs at runtime. If your application calls
OpenGL directly, instead of using a modern
[extension loader library](@ref context_glext_auto), use the OpenGL CMake
package.
```cmake
find_package(OpenGL REQUIRED)
```
If OpenGL is found, the `OpenGL::GL` target is added to your project, containing
library and include directory paths. Link against this like any other library.
```cmake
target_link_libraries(myapp OpenGL::GL)
```
### With pkg-config and GLFW binaries on Unix {#build_link_pkgconfig}
This is intended for building a program from the command-line or by writing
a makefile, on macOS or any Unix-like system like Linux, FreeBSD and Cygwin.
GLFW supports [pkg-config][], and the `glfw3.pc` pkg-config file is generated
when the GLFW library is built and is installed along with it. A pkg-config
file describes all necessary compile-time and link-time flags and dependencies
needed to use a library. When they are updated or if they differ between
systems, you will get the correct ones automatically.
[pkg-config]: https://www.freedesktop.org/wiki/Software/pkg-config/
A typical compile and link command-line when using the static version of the
GLFW library may look like this:
```sh
cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)
```
If you are using the shared version of the GLFW library, omit the `--static`
flag.
```sh
cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)
```
You can also use the `glfw3.pc` file without installing it first, by using the
`PKG_CONFIG_PATH` environment variable.
```sh
env PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)
```
The dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or
Vulkan libraries it needs at runtime. If your application calls OpenGL
directly, instead of using a modern
[extension loader library](@ref context_glext_auto), you should add the `gl`
pkg-config package.
```sh
cc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)
```
### With Xcode on macOS {#build_link_xcode}
If you are using the dynamic library version of GLFW, add it to the project
dependencies.
If you are using the static library version of GLFW, add it and the Cocoa,
OpenGL and IOKit frameworks to the project as dependencies. They can all be
found in `/System/Library/Frameworks`.
### With command-line or makefile on macOS {#build_link_osx}
It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when
using installed GLFW binaries from the command line on macOS. That way you will
get any new dependencies added automatically. If you still wish to build
manually, you need to add the required frameworks and libraries to your
command-line yourself using the `-l` and `-framework` switches.
If you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do:
```sh
cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit
```
If you are using the static library, named `libglfw3.a`, substitute `-lglfw3`
for `-lglfw`.
Note that you do not add the `.framework` extension to a framework when linking
against it from the command-line.
@note Your machine may have `libGL.*.dylib` style OpenGL library, but that is
for the X Window System and will not work with the macOS native version of GLFW.

View File

@ -0,0 +1,300 @@
# Standards conformance {#compat_guide}
[TOC]
This guide describes the various API extensions used by this version of GLFW.
It lists what are essentially implementation details, but which are nonetheless
vital knowledge for developers intending to deploy their applications on a wide
range of machines.
The information in this guide is not a part of GLFW API, but merely
preconditions for some parts of the library to function on a given machine. Any
part of this information may change in future versions of GLFW and that will not
be considered a breaking API change.
## X11 extensions, protocols and IPC standards {#compat_x11}
As GLFW uses Xlib directly, without any intervening toolkit library, it has sole
responsibility for interacting well with the many and varied window managers in
use on Unix-like systems. In order for applications and window managers to work
well together, a number of standards and conventions have been developed that
regulate behavior outside the scope of the X11 API; most importantly the
[Inter-Client Communication Conventions Manual][ICCCM] (ICCCM) and [Extended
Window Manager Hints][EWMH] (EWMH) standards.
[ICCCM]: https://www.tronche.com/gui/x/icccm/
[EWMH]: https://standards.freedesktop.org/wm-spec/wm-spec-latest.html
GLFW uses the `_MOTIF_WM_HINTS` window property to support borderless windows.
If the running window manager does not support this property, the
`GLFW_DECORATED` hint will have no effect.
GLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user
attempting to close the GLFW window. If the running window manager does not
support this protocol, the close callback will never be called.
GLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify
the user when the application has stopped responding, i.e. when it has ceased to
process events. If the running window manager does not support this protocol,
the user will not be notified if the application locks up.
GLFW uses the EWMH `_NET_WM_STATE_FULLSCREEN` window state to tell the window
manager to make the GLFW window full screen. If the running window manager does
not support this state, full screen windows may not work properly. GLFW has
a fallback code path in case this state is unavailable, but every window manager
behaves slightly differently in this regard.
GLFW uses the EWMH `_NET_WM_BYPASS_COMPOSITOR` window property to tell a
compositing window manager to un-redirect full screen GLFW windows. If the
running window manager uses compositing but does not support this property then
additional copying may be performed for each buffer swap of full screen windows.
GLFW uses the [clipboard manager protocol][ClipboardManager] to push a clipboard
string (i.e. selection) owned by a GLFW window about to be destroyed to the
clipboard manager. If there is no running clipboard manager, the clipboard
string will be unavailable once the window has been destroyed.
[clipboardManager]: https://www.freedesktop.org/wiki/ClipboardManager/
GLFW uses the [X drag-and-drop protocol][XDND] to provide file drop events. If
the application originating the drag does not support this protocol, drag and
drop will not work.
[XDND]: https://www.freedesktop.org/wiki/Specifications/XDND/
GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the
running X server does not support this version of this extension, multi-monitor
support will not function and only a single, desktop-spanning monitor will be
reported.
GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp
support. If the running X server does not support either or both of these
extensions, gamma ramp support will not function.
GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard
input. If the running X server does not support this extension, a non-Xkb
fallback path is used.
GLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion
when the cursor is disabled. If the running X server does not support this
extension, regular accelerated mouse motion will be used.
GLFW uses both the XRender extension and the compositing manager to support
transparent window framebuffers. If the running X server does not support this
extension or there is no running compositing manager, the
`GLFW_TRANSPARENT_FRAMEBUFFER` framebuffer hint will have no effect.
GLFW uses both the Xcursor extension and the freedesktop cursor conventions to
provide an expanded set of standard cursor shapes. If the running X server does
not support this extension or the current cursor theme does not support the
conventions, the `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR` and
`GLFW_NOT_ALLOWED_CURSOR` shapes will not be available and other shapes may use
legacy images.
## Wayland protocols and IPC standards {#compat_wayland}
As GLFW uses libwayland directly, without any intervening toolkit library, it
has sole responsibility for interacting well with every compositor in use on
Unix-like systems. Most of the features are provided by the core protocol,
while cursor support is provided by the libwayland-cursor helper library, EGL
integration by libwayland-egl, and keyboard handling by
[libxkbcommon](https://xkbcommon.org/). In addition, GLFW uses some additional
Wayland protocols to implement certain features if the compositor supports them.
GLFW uses xkbcommon 0.5.0 to provide key and text input support. Earlier
versions are not supported.
GLFW uses the [xdg-shell][] protocol to provide better window management. This
protocol is mandatory for GLFW to display a window.
[xdg-shell]: https://wayland.app/protocols/xdg-shell
GLFW uses the [relative-pointer-unstable-v1][] protocol alongside the
[pointer-constraints-unstable-v1][] protocol to implement disabled cursor. If
the running compositor does not support both of these protocols, disabling the
cursor will have no effect.
[relative-pointer-unstable-v1]: https://wayland.app/protocols/relative-pointer-unstable-v1
[pointer-constraints-unstable-v1]: https://wayland.app/protocols/pointer-constraints-unstable-v1
GLFW uses the [idle-inhibit-unstable-v1][] protocol to prohibit the screensaver
from starting. If the running compositor does not support this protocol, the
screensaver may start even for full screen windows.
[idle-inhibit-unstable-v1]: https://wayland.app/protocols/idle-inhibit-unstable-v1
GLFW uses the [libdecor][] library for window decorations, where available.
This in turn provides good quality client-side decorations (drawn by the
application) on desktop systems that do not support server-side decorations
(drawn by the window manager). On systems that do not provide either libdecor
or xdg-decoration, very basic window decorations are provided. These do not
include the window title or any caption buttons.
[libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor
GLFW uses the [xdg-decoration-unstable-v1][] protocol to request decorations to
be drawn around its windows. This protocol is part of wayland-protocols 1.15,
and mandatory at build time. If the running compositor does not support this
protocol, a very simple frame will be drawn by GLFW itself, using the
[viewporter][] protocol alongside subsurfaces. If the running compositor does
not support these protocols either, no decorations will be drawn around windows.
[xdg-decoration-unstable-v1]: https://wayland.app/protocols/xdg-decoration-unstable-v1
[viewporter]: https://wayland.app/protocols/viewporter
GLFW uses the [xdg-activation-v1][] protocol to implement window focus and
attention requests. If the running compositor does not support this protocol,
window focus and attention requests do nothing.
[xdg-activation-v1]: https://wayland.app/protocols/xdg-activation-v1
GLFW uses the [fractional-scale-v1][] protocol to implement fine-grained
framebuffer scaling. If the running compositor does not support this protocol,
the @ref GLFW_SCALE_FRAMEBUFFER window hint will only be able to scale the
framebuffer by integer scales. This will typically be the smallest integer not
less than the actual scale.
[fractional-scale-v1]: https://wayland.app/protocols/fractional-scale-v1
## GLX extensions {#compat_glx}
The GLX API is the default API used to create OpenGL contexts on Unix-like
systems using the X Window System.
GLFW uses the GLX 1.3 `GLXFBConfig` functions to enumerate and select framebuffer pixel
formats. If GLX 1.3 is not supported, @ref glfwInit will fail.
GLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and
`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization
(or _vsync_), in that order of preference. When none of these extensions are
available, calling @ref glfwSwapInterval will have no effect.
GLFW uses the `GLX_ARB_multisample` extension to create contexts with
multisampling anti-aliasing. Where this extension is unavailable, the
`GLFW_SAMPLES` hint will have no effect.
GLFW uses the `GLX_ARB_create_context` extension when available, even when
creating OpenGL contexts of version 2.1 and below. Where this extension is
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
hints will only be partially supported, the `GLFW_CONTEXT_DEBUG` hint will have
no effect, and setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT`
hints to `GLFW_TRUE` will cause @ref glfwCreateWindow to fail.
GLFW uses the `GLX_ARB_create_context_profile` extension to provide support for
context profiles. Where this extension is unavailable, setting the
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE`, or setting
`GLFW_CLIENT_API` to anything but `GLFW_OPENGL_API` or `GLFW_NO_API` will cause
@ref glfwCreateWindow to fail.
GLFW uses the `GLX_ARB_context_flush_control` extension to provide control over
whether a context is flushed when it is released (made non-current). Where this
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
effect and the context will always be flushed when released.
GLFW uses the `GLX_ARB_framebuffer_sRGB` and `GLX_EXT_framebuffer_sRGB`
extensions to provide support for sRGB framebuffers. Where both of these
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
## WGL extensions {#compat_wgl}
The WGL API is used to create OpenGL contexts on Microsoft Windows and other
implementations of the Win32 API, such as Wine.
GLFW uses either the `WGL_EXT_extension_string` or the
`WGL_ARB_extension_string` extension to check for the presence of all other WGL
extensions listed below. If both are available, the EXT one is preferred. If
neither is available, no other extensions are used and many GLFW features
related to context creation will have no effect or cause errors when used.
GLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace
synchronization (or _vsync_). Where this extension is unavailable, calling @ref
glfwSwapInterval will have no effect.
GLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to
create contexts with multisampling anti-aliasing. Where these extensions are
unavailable, the `GLFW_SAMPLES` hint will have no effect.
GLFW uses the `WGL_ARB_create_context` extension when available, even when
creating OpenGL contexts of version 2.1 and below. Where this extension is
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
hints will only be partially supported, the `GLFW_CONTEXT_DEBUG` hint will have
no effect, and setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT`
hints to `GLFW_TRUE` will cause @ref glfwCreateWindow to fail.
GLFW uses the `WGL_ARB_create_context_profile` extension to provide support for
context profiles. Where this extension is unavailable, setting the
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE` will cause
@ref glfwCreateWindow to fail.
GLFW uses the `WGL_ARB_context_flush_control` extension to provide control over
whether a context is flushed when it is released (made non-current). Where this
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
effect and the context will always be flushed when released.
GLFW uses the `WGL_ARB_framebuffer_sRGB` and `WGL_EXT_framebuffer_sRGB`
extensions to provide support for sRGB framebuffers. When both of these
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
## OpenGL on macOS {#compat_osx}
Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then
only forward-compatible, core profile contexts are supported. Support for
OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible,
core profile contexts. There is also still no mechanism for requesting debug
contexts or no-error contexts. Versions of Mac OS X earlier than 10.7 support
at most OpenGL version 2.1.
Because of this, on OS X 10.7 and later, the `GLFW_CONTEXT_VERSION_MAJOR` and
`GLFW_CONTEXT_VERSION_MINOR` hints will cause @ref glfwCreateWindow to fail if
given version 3.0 or 3.1. The `GLFW_OPENGL_PROFILE` hint must be set to
`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts. The
`GLFW_CONTEXT_DEBUG` and `GLFW_CONTEXT_NO_ERROR` hints are ignored.
Also, on Mac OS X 10.6 and below, the `GLFW_CONTEXT_VERSION_MAJOR` and
`GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 2.1,
setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT` hints to
a non-default value will cause @ref glfwCreateWindow to fail and the
`GLFW_CONTEXT_DEBUG` hint is ignored.
## Vulkan loader and API {#compat_vulkan}
By default, GLFW uses the standard system-wide Vulkan loader to access the
Vulkan API on all platforms except macOS. This is installed by both graphics
drivers and Vulkan SDKs. If either the loader or at least one minimally
functional ICD is missing, @ref glfwVulkanSupported will return `GLFW_FALSE` and
all other Vulkan-related functions will fail with an @ref GLFW_API_UNAVAILABLE
error.
## Vulkan WSI extensions {#compat_wsi}
The Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on
all supported platforms.
GLFW uses the `VK_KHR_surface` and `VK_KHR_win32_surface` extensions to create
surfaces on Microsoft Windows. If any of these extensions are not available,
@ref glfwGetRequiredInstanceExtensions will return an empty list and window
surface creation will fail.
GLFW uses the `VK_KHR_surface` and either the `VK_MVK_macos_surface` or
`VK_EXT_metal_surface` extensions to create surfaces on macOS. If any of these
extensions are not available, @ref glfwGetRequiredInstanceExtensions will
return an empty list and window surface creation will fail.
GLFW uses the `VK_KHR_surface` and either the `VK_KHR_xlib_surface` or
`VK_KHR_xcb_surface` extensions to create surfaces on X11. If `VK_KHR_surface`
or both `VK_KHR_xlib_surface` and `VK_KHR_xcb_surface` are not available, @ref
glfwGetRequiredInstanceExtensions will return an empty list and window surface
creation will fail.
GLFW uses the `VK_KHR_surface` and `VK_KHR_wayland_surface` extensions to create
surfaces on Wayland. If any of these extensions are not available, @ref
glfwGetRequiredInstanceExtensions will return an empty list and window surface
creation will fail.

View File

@ -0,0 +1,371 @@
# Compiling GLFW {#compile_guide}
[TOC]
This is about compiling the GLFW library itself. For information on how to
build applications that use GLFW, see @ref build_guide.
GLFW uses some C99 features and does not support Visual Studio 2012 and earlier.
## Using CMake {#compile_cmake}
GLFW behaves like most other libraries that use CMake so this guide mostly
describes the standard configure, generate and compile sequence. If you are already
familiar with this from other projects, you may want to focus on the @ref
compile_deps and @ref compile_options sections for GLFW-specific information.
GLFW uses [CMake](https://cmake.org/) to generate project files or makefiles
for your chosen development environment. To compile GLFW, first generate these
files with CMake and then use them to compile the GLFW library.
If you are on Windows and macOS you can [download
CMake](https://cmake.org/download/) from their site.
If you are on a Unix-like system such as Linux, FreeBSD or Cygwin or have
a package system like Fink, MacPorts or Homebrew, you can install its CMake
package.
CMake is a complex tool and this guide will only show a few of the possible ways
to set up and compile GLFW. The CMake project has their own much more detailed
[CMake user guide][cmake-guide] that includes everything in this guide not
specific to GLFW. It may be a useful companion to this one.
[cmake-guide]: https://cmake.org/cmake/help/latest/guide/user-interaction/
### Installing dependencies {#compile_deps}
The C/C++ development environments in Visual Studio, Xcode and MinGW come with
all necessary dependencies for compiling GLFW, but on Unix-like systems like
Linux and FreeBSD you will need a few extra packages.
#### Dependencies for Wayland and X11 {#compile_deps_wayland}
By default, both the Wayland and X11 backends are enabled on Linux and other Unix-like
systems (except macOS). To disable one or both of these, set the @ref GLFW_BUILD_WAYLAND
or @ref GLFW_BUILD_X11 CMake options in the next step when generating build files.
To compile GLFW for both Wayland and X11, you need to have the X11, Wayland and xkbcommon
development packages installed. On some systems a few other packages are also required.
None of the development packages above are needed to build or run programs that use an
already compiled GLFW library.
On Debian and derivatives like Ubuntu and Linux Mint you will need the `libwayland-dev`
and `libxkbcommon-dev` packages to compile for Wayland and the `xorg-dev` meta-package to
compile for X11. These will pull in all other dependencies.
```sh
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
```
On Fedora and derivatives like Red Hat you will need the `wayland-devel` and
`libxkbcommon-devel` packages to compile for Wayland and the `libXcursor-devel`,
`libXi-devel`, `libXinerama-devel` and `libXrandr-devel` packages to compile for X11.
These will pull in all other dependencies.
```sh
sudo dnf install wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
```
On FreeBSD you will need the `wayland`, `libxkbcommon` and `evdev-proto` packages to
compile for Wayland. The X11 headers are installed along the end-user X11 packages, so if
you have an X server running you should have the headers as well. If not, install the
`xorgproto` package to compile for X11.
```sh
pkg install wayland libxkbcommon evdev-proto xorgproto
```
On Cygwin Wayland is not supported but you will need the `libXcursor-devel`,
`libXi-devel`, `libXinerama-devel`, `libXrandr-devel` and `libXrender-devel` packages to
compile for X11. These can be found in the Libs section of the GUI installer and will
pull in all other dependencies.
Once you have the required dependencies, move on to @ref compile_generate.
### Generating build files with CMake {#compile_generate}
Once you have all necessary dependencies it is time to generate the project
files or makefiles for your development environment. CMake needs two paths for
this:
- the path to the root directory of the GLFW source tree (not its `src`
subdirectory)
- the path to the directory where the generated build files and compiled
binaries will be placed
If these are the same, it is called an in-tree build, otherwise it is called an
out-of-tree build.
Out-of-tree builds are recommended as they avoid cluttering up the source tree.
They also allow you to have several build directories for different
configurations all using the same source tree.
A common pattern when building a single configuration is to have a build
directory named `build` in the root of the source tree.
#### Generating with the CMake GUI {#compile_generate_gui}
Start the CMake GUI and set the paths to the source and build directories
described above. Then press _Configure_ and _Generate_.
If you wish change any CMake variables in the list, press _Configure_ and then
_Generate_ to have the new values take effect. The variable list will be
populated after the first configure step.
By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
macOS. To disable support for one or both of these, set the @ref GLFW_BUILD_WAYLAND
and/or @ref GLFW_BUILD_X11 option in the GLFW section of the variable list, then apply the
new value as described above.
Once you have generated the project files or makefiles for your chosen
development environment, move on to @ref compile_compile.
#### Generating with command-line CMake {#compile_generate_cli}
To make a build directory, pass the source and build directories to the `cmake`
command. These can be relative or absolute paths. The build directory is
created if it doesn't already exist.
```sh
cmake -S path/to/glfw -B path/to/build
```
It is common to name the build directory `build` and place it in the root of the
source tree when only planning to build a single configuration.
```sh
cd path/to/glfw
cmake -S . -B build
```
Without other flags these will generate Visual Studio project files on Windows
and makefiles on other platforms. You can choose other targets using the `-G`
flag.
```sh
cmake -S path/to/glfw -B path/to/build -G Xcode
```
By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
macOS. To disable support for one or both of these, set the @ref GLFW_BUILD_WAYLAND
and/or @ref GLFW_BUILD_X11 CMake option.
```sh
cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_X11=0
```
Once you have generated the project files or makefiles for your chosen
development environment, move on to @ref compile_compile.
### Compiling the library {#compile_compile}
You should now have all required dependencies and the project files or makefiles
necessary to compile GLFW. Go ahead and compile the actual GLFW library with
these files as you would with any other project.
With Visual Studio open `GLFW.sln` and use the Build menu. With Xcode open
`GLFW.xcodeproj` and use the Project menu.
With Linux, macOS and other forms of Unix, run `make`.
```sh
cd path/to/build
make
```
With MinGW, it is `mingw32-make`.
```sh
cd path/to/build
mingw32-make
```
Any CMake build directory can also be built with the `cmake` command and the
`--build` flag.
```sh
cmake --build path/to/build
```
This will run the platform specific build tool the directory was generated for.
Once the GLFW library is compiled you are ready to build your application,
linking it to the GLFW library. See @ref build_guide for more information.
## CMake options {#compile_options}
The CMake files for GLFW provide a number of options, although not all are
available on all supported platforms. Some of these are de facto standards
among projects using CMake and so have no `GLFW_` prefix.
If you are using the GUI version of CMake, these are listed and can be changed
from there. If you are using the command-line version of CMake you can use the
`ccmake` ncurses GUI to set options. Some package systems like Ubuntu and other
distributions based on Debian GNU/Linux have this tool in a separate
`cmake-curses-gui` package.
Finally, if you don't want to use any GUI, you can set options from the `cmake`
command-line with the `-D` flag.
```sh
cmake -S path/to/glfw -B path/to/build -D BUILD_SHARED_LIBS=ON
```
### Shared CMake options {#compile_options_shared}
@anchor BUILD_SHARED_LIBS
__BUILD_SHARED_LIBS__ determines whether GLFW is built as a static library or as
a DLL / shared library / dynamic library. This is disabled by default,
producing a static GLFW library. This variable has no `GLFW_` prefix because it
is defined by CMake. If you want to change the library only for GLFW when it is
part of a larger project, see @ref GLFW_LIBRARY_TYPE.
@anchor GLFW_LIBRARY_TYPE
__GLFW_LIBRARY_TYPE__ allows you to override @ref BUILD_SHARED_LIBS only for
GLFW, without affecting other libraries in a larger project. When set, the
value of this option must be a valid CMake library type. Set it to `STATIC` to
build GLFW as a static library, `SHARED` to build it as a shared library
/ dynamic library / DLL, or `OBJECT` to make GLFW a CMake object library.
@anchor GLFW_BUILD_EXAMPLES
__GLFW_BUILD_EXAMPLES__ determines whether the GLFW examples are built
along with the library. This is enabled by default unless GLFW is being built
as a subproject of a larger CMake project.
@anchor GLFW_BUILD_TESTS
__GLFW_BUILD_TESTS__ determines whether the GLFW test programs are
built along with the library. This is enabled by default unless GLFW is being
built as a subproject of a larger CMake project.
@anchor GLFW_BUILD_DOCS
__GLFW_BUILD_DOCS__ determines whether the GLFW documentation is built along
with the library. This is enabled by default if
[Doxygen](https://www.doxygen.nl/) is found by CMake during configuration.
### Win32 specific CMake options {#compile_options_win32}
@anchor GLFW_BUILD_WIN32
__GLFW_BUILD_WIN32__ determines whether to include support for Win32 when compiling the
library. This option is only available when compiling for Windows. This is enabled by
default.
@anchor USE_MSVC_RUNTIME_LIBRARY_DLL
__USE_MSVC_RUNTIME_LIBRARY_DLL__ determines whether to use the DLL version or the
static library version of the Visual C++ runtime library. When enabled, the
DLL version of the Visual C++ library is used. This is enabled by default.
On CMake 3.15 and later you can set the standard CMake [CMAKE_MSVC_RUNTIME_LIBRARY][]
variable instead of this GLFW-specific option.
[CMAKE_MSVC_RUNTIME_LIBRARY]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
@anchor GLFW_USE_HYBRID_HPG
__GLFW_USE_HYBRID_HPG__ determines whether to export the `NvOptimusEnablement` and
`AmdPowerXpressRequestHighPerformance` symbols, which force the use of the
high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols
need to be exported by the EXE to be detected by the driver, so the override
will not work if GLFW is built as a DLL. This is disabled by default, letting
the operating system and driver decide.
### macOS specific CMake options {#compile_options_macos}
@anchor GLFW_BUILD_COCOA
__GLFW_BUILD_COCOA__ determines whether to include support for Cocoa when compiling the
library. This option is only available when compiling for macOS. This is enabled by
default.
### Unix-like system specific CMake options {#compile_options_unix}
@anchor GLFW_BUILD_WAYLAND
__GLFW_BUILD_WAYLAND__ determines whether to include support for Wayland when compiling
the library. This option is only available when compiling for Linux and other Unix-like
systems other than macOS. This is enabled by default.
@anchor GLFW_BUILD_X11
__GLFW_BUILD_X11__ determines whether to include support for X11 when compiling the
library. This option is only available when compiling for Linux and other Unix-like
systems other than macOS. This is enabled by default.
## Cross-compilation with CMake and MinGW {#compile_mingw_cross}
Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For
example, Cygwin has the `mingw64-i686-gcc` and `mingw64-x86_64-gcc` packages
for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives
like Ubuntu have the `mingw-w64` package for both.
GLFW has CMake toolchain files in the `CMake` subdirectory that set up
cross-compilation of Windows binaries. To use these files you set the
`CMAKE_TOOLCHAIN_FILE` CMake variable with the `-D` flag add an option when
configuring and generating the build files.
```sh
cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=path/to/file
```
The exact toolchain file to use depends on the prefix used by the MinGW or
MinGW-w64 binaries on your system. You can usually see this in the /usr
directory. For example, both the Ubuntu and Cygwin MinGW-w64 packages have
`/usr/x86_64-w64-mingw32` for the 64-bit compilers, so the correct invocation
would be:
```sh
cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake
```
The path to the toolchain file is relative to the path to the GLFW source tree
passed to the `-S` flag, not to the current directory.
For more details see the [CMake toolchain guide][cmake-toolchains].
[cmake-toolchains]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
## Compiling GLFW manually {#compile_manual}
If you wish to compile GLFW without its CMake build environment then you will have to do
at least some platform-detection yourself. There are preprocessor macros for
enabling support for the platforms (window systems) available. There are also optional,
platform-specific macros for various features.
When building, GLFW will expect the necessary configuration macros to be defined
on the command-line. The GLFW CMake files set these as private compile
definitions on the GLFW target but if you compile the GLFW sources manually you
will need to define them yourself.
The window system is used to create windows, handle input, monitors, gamma ramps and
clipboard. The options are:
- @b _GLFW_COCOA to use the Cocoa frameworks
- @b _GLFW_WIN32 to use the Win32 API
- @b _GLFW_WAYLAND to use the Wayland protocol
- @b _GLFW_X11 to use the X Window System
The @b _GLFW_WAYLAND and @b _GLFW_X11 macros may be combined and produces a library that
attempts to detect the appropriate platform at initialization.
If you are building GLFW as a shared library / dynamic library / DLL then you
must also define @b _GLFW_BUILD_DLL. Otherwise, you must not define it.
If you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1
or GLESv2 library, you can override the default names by defining those you need
of @b _GLFW_VULKAN_LIBRARY, @b _GLFW_EGL_LIBRARY, @b _GLFW_GLX_LIBRARY, @b
_GLFW_OSMESA_LIBRARY, @b _GLFW_OPENGL_LIBRARY, @b _GLFW_GLESV1_LIBRARY and @b
_GLFW_GLESV2_LIBRARY. Otherwise, GLFW will use the built-in default names.
@note None of the @ref build_macros may be defined during the compilation of
GLFW. If you define any of these in your build files, make sure they are not
applied to the GLFW sources.

View File

@ -0,0 +1,340 @@
# Context guide {#context_guide}
[TOC]
This guide introduces the OpenGL and OpenGL ES context related functions of
GLFW. For details on a specific function in this category, see the @ref
context. There are also guides for the other areas of the GLFW API.
- @ref intro_guide
- @ref window_guide
- @ref vulkan_guide
- @ref monitor_guide
- @ref input_guide
## Context objects {#context_object}
A window object encapsulates both a top-level window and an OpenGL or OpenGL ES
context. It is created with @ref glfwCreateWindow and destroyed with @ref
glfwDestroyWindow or @ref glfwTerminate. See @ref window_creation for more
information.
As the window and context are inseparably linked, the window object also serves
as the context handle.
To test the creation of various kinds of contexts and see their properties, run
the `glfwinfo` test program.
@note Vulkan does not have a context and the Vulkan instance is created via the
Vulkan API itself. If you will be using Vulkan to render to a window, disable
context creation by setting the [GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint)
hint to `GLFW_NO_API`. For more information, see the @ref vulkan_guide.
### Context creation hints {#context_hints}
There are a number of hints, specified using @ref glfwWindowHint, related to
what kind of context is created. See
[context related hints](@ref window_hints_ctx) in the window guide.
### Context object sharing {#context_sharing}
When creating a window and its OpenGL or OpenGL ES context with @ref
glfwCreateWindow, you can specify another window whose context the new one
should share its objects (textures, vertex and element buffers, etc.) with.
```c
GLFWwindow* second_window = glfwCreateWindow(640, 480, "Second Window", NULL, first_window);
```
Object sharing is implemented by the operating system and graphics driver. On
platforms where it is possible to choose which types of objects are shared, GLFW
requests that all types are shared.
See the relevant chapter of the [OpenGL](https://www.opengl.org/registry/) or
[OpenGL ES](https://www.khronos.org/opengles/) reference documents for more
information. The name and number of this chapter unfortunately varies between
versions and APIs, but has at times been named _Shared Objects and Multiple
Contexts_.
GLFW comes with a bare-bones object sharing example program called `sharing`.
### Offscreen contexts {#context_offscreen}
GLFW doesn't support creating contexts without an associated window. However,
contexts with hidden windows can be created with the
[GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window hint.
```c
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
GLFWwindow* offscreen_context = glfwCreateWindow(640, 480, "", NULL, NULL);
```
The window never needs to be shown and its context can be used as a plain
offscreen context. Depending on the window manager, the size of a hidden
window's framebuffer may not be usable or modifiable, so framebuffer
objects are recommended for rendering with such contexts.
You should still [process events](@ref events) as long as you have at least one
window, even if none of them are visible.
### Windows without contexts {#context_less}
You can disable context creation by setting the
[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint to `GLFW_NO_API`.
Windows without contexts should not be passed to @ref glfwMakeContextCurrent or
@ref glfwSwapBuffers. Doing this generates a @ref GLFW_NO_WINDOW_CONTEXT error.
## Current context {#context_current}
Before you can make OpenGL or OpenGL ES calls, you need to have a current
context of the correct type. A context can only be current for a single thread
at a time, and a thread can only have a single context current at a time.
When moving a context between threads, you must make it non-current on the old
thread before making it current on the new one.
The context of a window is made current with @ref glfwMakeContextCurrent.
```c
glfwMakeContextCurrent(window);
```
The window of the current context is returned by @ref glfwGetCurrentContext.
```c
GLFWwindow* window = glfwGetCurrentContext();
```
The following GLFW functions require a context to be current. Calling any these
functions without a current context will generate a @ref GLFW_NO_CURRENT_CONTEXT
error.
- @ref glfwSwapInterval
- @ref glfwExtensionSupported
- @ref glfwGetProcAddress
## Buffer swapping {#context_swap}
See @ref buffer_swap in the window guide.
## OpenGL and OpenGL ES extensions {#context_glext}
One of the benefits of OpenGL and OpenGL ES is their extensibility.
Hardware vendors may include extensions in their implementations that extend the
API before that functionality is included in a new version of the OpenGL or
OpenGL ES specification, and some extensions are never included and remain
as extensions until they become obsolete.
An extension is defined by:
- An extension name (e.g. `GL_ARB_gl_spirv`)
- New OpenGL tokens (e.g. `GL_SPIR_V_BINARY_ARB`)
- New OpenGL functions (e.g. `glSpecializeShaderARB`)
Note the `ARB` affix, which stands for Architecture Review Board and is used
for official extensions. The extension above was created by the ARB, but there
are many different affixes, like `NV` for Nvidia and `AMD` for, well, AMD. Any
group may also use the generic `EXT` affix. Lists of extensions, together with
their specifications, can be found at the
[OpenGL Registry](https://www.opengl.org/registry/) and
[OpenGL ES Registry](https://www.khronos.org/registry/gles/).
### Loading extension with a loader library {#context_glext_auto}
An extension loader library is the easiest and best way to access both OpenGL and
OpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs.
They will take care of all the details of declaring and loading everything you
need. One such library is [glad](https://github.com/Dav1dde/glad) and there are
several others.
The following example will use glad but all extension loader libraries work
similarly.
First you need to generate the source files using the glad Python script. This
example generates a loader for any version of OpenGL, which is the default for
both GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific
API versions and extension sets can be generated. The generated files are
written to the `output` directory.
```sh
python main.py --generator c --no-loader --out-path output
```
The `--no-loader` option is added because GLFW already provides a function for
loading OpenGL and OpenGL ES function pointers, one that automatically uses the
selected context creation API, and glad can call this instead of having to
implement its own. There are several other command-line options as well. See
the glad documentation for details.
Add the generated `output/src/glad.c`, `output/include/glad/glad.h` and
`output/include/KHR/khrplatform.h` files to your build. Then you need to
include the glad header file, which will replace the OpenGL header of your
development environment. By including the glad header before the GLFW header,
it suppresses the development environment's OpenGL or OpenGL ES header.
```c
#include <glad/glad.h>
#include <GLFW/glfw3.h>
```
Finally, you need to initialize glad once you have a suitable current context.
```c
window = glfwCreateWindow(640, 480, "My Window", NULL, NULL);
if (!window)
{
...
}
glfwMakeContextCurrent(window);
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
```
Once glad has been loaded, you have access to all OpenGL core and extension
functions supported by both the context you created and the glad loader you
generated. After that, you are ready to start rendering.
You can specify a minimum required OpenGL or OpenGL ES version with
[context hints](@ref window_hints_ctx). If your needs are more complex, you can
check the actual OpenGL or OpenGL ES version with
[context attributes](@ref window_attribs_ctx), or you can check whether
a specific version is supported by the current context with the
`GLAD_GL_VERSION_x_x` booleans.
```c
if (GLAD_GL_VERSION_3_2)
{
// Call OpenGL 3.2+ specific code
}
```
To check whether a specific extension is supported, use the `GLAD_GL_xxx`
booleans.
```c
if (GLAD_GL_ARB_gl_spirv)
{
// Use GL_ARB_gl_spirv
}
```
### Loading extensions manually {#context_glext_manual}
__Do not use this technique__ unless it is absolutely necessary. An
[extension loader library](@ref context_glext_auto) will save you a ton of
tedious, repetitive, error prone work.
To use a certain extension, you must first check whether the context supports
that extension and then, if it introduces new functions, retrieve the pointers
to those functions. GLFW provides @ref glfwExtensionSupported and @ref
glfwGetProcAddress for manual loading of extensions and new API functions.
This section will demonstrate manual loading of OpenGL extensions. The loading
of OpenGL ES extensions is identical except for the name of the extension header.
#### The glext.h header {#context_glext_header}
The `glext.h` extension header is a continually updated file that defines the
interfaces for all OpenGL extensions. The latest version of this can always be
found at the [OpenGL Registry](https://www.opengl.org/registry/). There are also
extension headers for the various versions of OpenGL ES at the
[OpenGL ES Registry](https://www.khronos.org/registry/gles/). It it strongly
recommended that you use your own copy of the extension header, as the one
included in your development environment may be several years out of date and
may not include the extensions you wish to use.
The header defines function pointer types for all functions of all extensions it
supports. These have names like `PFNGLSPECIALIZESHADERARBPROC` (for
`glSpecializeShaderARB`), i.e. the name is made uppercase and `PFN` (pointer
to function) and `PROC` (procedure) are added to the ends.
To include the extension header, define @ref GLFW_INCLUDE_GLEXT before including
the GLFW header.
```c
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
```
#### Checking for extensions {#context_glext_string}
A given machine may not actually support the extension (it may have older
drivers or a graphics card that lacks the necessary hardware features), so it
is necessary to check at run-time whether the context supports the extension.
This is done with @ref glfwExtensionSupported.
```c
if (glfwExtensionSupported("GL_ARB_gl_spirv"))
{
// The extension is supported by the current context
}
```
The argument is a null terminated ASCII string with the extension name. If the
extension is supported, @ref glfwExtensionSupported returns `GLFW_TRUE`,
otherwise it returns `GLFW_FALSE`.
#### Fetching function pointers {#context_glext_proc}
Many extensions, though not all, require the use of new OpenGL functions.
These functions often do not have entry points in the client API libraries of
your operating system, making it necessary to fetch them at run time. You can
retrieve pointers to these functions with @ref glfwGetProcAddress.
```c
PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB = glfwGetProcAddress("glSpecializeShaderARB");
```
In general, you should avoid giving the function pointer variables the (exact)
same name as the function, as this may confuse your linker. Instead, you can
use a different prefix, like above, or some other naming scheme.
Now that all the pieces have been introduced, here is what they might look like
when used together.
```c
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#define glSpecializeShaderARB pfnSpecializeShaderARB
PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB;
// Flag indicating whether the extension is supported
int has_ARB_gl_spirv = 0;
void load_extensions(void)
{
if (glfwExtensionSupported("GL_ARB_gl_spirv"))
{
pfnSpecializeShaderARB = (PFNGLSPECIALIZESHADERARBPROC)
glfwGetProcAddress("glSpecializeShaderARB");
has_ARB_gl_spirv = 1;
}
}
void some_function(void)
{
if (has_ARB_gl_spirv)
{
// Now the extension function can be called as usual
glSpecializeShaderARB(...);
}
}
```

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
{
"version": 3,
"mappings": "AA8EA,2GAA4G,CAC3G,UAAU,CAAC,IAAI,CACf,WAAW,CAAC,IAAI,CAGjB,wBAAyB,CACxB,YAAY,CAAC,2CAAsD,CAGpE,4HAA6H,CAC5H,YAAY,CAAC,wCAAuD,CAGrE,wIAAyI,CACxI,YAAY,CAAC,wCAAuD,CAGrE,kBAAmB,CAClB,UAAU,CA9EgB,IAAa,CA+EvC,WAAW,CAAC,IAAI,CAGjB,sBAAuB,CACtB,KAAK,CAzFe,OAAa,CA0FjC,WAAW,CAAC,IAAI,CAGjB,4UAA6U,CAC5U,UAAU,CAAC,IAAI,CAGhB,kJAAmJ,CAClJ,MAAM,CAAC,IAAI,CAGZ,wHAAyH,CACxH,WAAW,CAAC,IAAI,CAGjB,qBAAsB,CACrB,UAAU,CAAC,IAAI,CAGhB,2LAA4L,CAC3L,OAAO,CAAC,CAAC,CAGV,wCAAyC,CACxC,OAAO,CAAC,IAAI,CAGb,iMAAkM,CACjM,UAAU,CApGW,OAA+B,CAuGrD,IAAK,CACJ,KAAK,CA1He,OAAa,CA6HlC,SAAU,CACN,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,aAAa,CAGzB,qDAAsD,CACrD,KAAK,CApHU,OAAa,CAqH5B,aAAa,CAAC,IAAI,CAGnB,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,SAAS,CAAC,IAAI,CAGf,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,aAAa,CAAC,CAAC,CACf,SAAS,CAAC,IAAI,CAGf,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,aAAa,CAAC,CAAC,CACf,SAAS,CAAC,IAAI,CAGf,WAAY,CACX,SAAS,CAAC,IAAI,CACd,UAAU,CAAC,IAAI,CACf,SAAS,CAAC,KAAK,CACf,OAAO,CAAC,MAAM,CACd,MAAM,CAAC,MAAM,CAEb,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,SAAS,CAAE,IAAI,CACf,eAAe,CAAE,UAAU,CAC3B,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,OAAO,CAGvB,SAAU,CACT,WAAW,CAAC,IAAI,CAChB,aAAa,CAAC,IAAI,CAClB,KAAK,CApKqB,IAAa,CAqKvC,SAAS,CAAC,KAAK,CACf,UAAU,CAAC,yDAAyD,CAGrE,WAAY,CACX,eAAe,CAAC,IAAI,CACpB,MAAM,CAAC,UAAU,CACjB,KAAK,CAAC,KAAK,CAGZ,wBAAyB,CACxB,KAAK,CAAC,IAAI,CAGX,mCAAoC,CACnC,WAAW,CAAC,IAAI,CAChB,WAAW,CAAC,GAAG,CACf,OAAO,CAAC,KAAK,CACb,KAAK,CAvLqB,IAAa,CA0LxC,WAAY,CACX,YAAY,CAAE,CAAC,CAGhB,6CAA8C,CAC7C,UAAU,CAAC,SAAS,CAGrB,kBAAmB,CAClB,KAAK,CAnMqB,IAAa,CAsMxC,cAAe,CACd,UAAU,CAAC,MAAM,CACjB,OAAO,CAAC,GAAG,CACX,UAAU,CAAC,GAAG,CAGf,IAAK,CACJ,UAAU,CA7MgB,IAAa,CAgNxC,SAAU,CACT,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,SAAS,CAAC,IAAI,CAGf,UAAW,CACV,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,SAAS,CAAC,IAAI,CAGf,SAAU,CACT,OAAO,CAAC,IAAI,CAGb,kBAAmB,CAClB,WAAW,CAAC,IAAI,CAChB,WAAW,CAAC,IAAI,CAGjB,UAAW,CACV,UAAU,CAAC,IAAI,CACf,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,SAAS,CAAE,IAAI,CACf,eAAe,CAAE,UAAU,CAC3B,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,OAAO,CAGvB,kBAAmB,CACf,aAAa,CAAE,IAAI,CAGvB,kEAAmE,CAClE,KAAK,CAxOgB,OAA+B,CA2OrD,+BAAgC,CAC/B,KAAK,CA9Pe,OAAa,CAiQlC,qCAAsC,CACrC,KAAK,CA9NoB,IAAsB,CAiOhD,wBAA2B,CAC1B,MAAM,CAAE,UAAU,CAGnB,SAAU,CACT,UAAU,CAAC,KAAK,CAGjB,uBAAwB,CACvB,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,OAAO,CAAC,MAAM,CACd,UAAU,CAAC,SAA8B,CAG1C,sDAAuD,CACtD,UAAU,CAAC,iDAAoF,CAC/F,UAAU,CAAC,mBAAuC,CAClD,WAAW,CAAC,kBAAgD,CAC5D,UAAU,CAAC,IAAI,CACf,KAAK,CAtPa,IAAe,CAyPlC,kBAAmB,CAClB,KAAK,CAzPoB,IAAsB,CA0P/C,OAAO,CAAC,IAAI,CACZ,aAAa,CAAC,GAAG,CACjB,gBAAgB,CAAC,OAAiC,CAGnD,OAAQ,CACP,KAAK,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAGV,oCAAoC,CACnC,OAAQ,CACP,KAAK,CAAC,IAAI,CACV,KAAK,CAAC,OAAO,CACb,MAAM,CAAC,CAAC,EAIV,UAAW,CACV,SAAS,CAAC,MAAM,CAGjB,UAAW,CACV,YAAY,CAAC,KAAK,CAGnB,UAAW,CACV,SAAS,CAAC,GAAG,CACb,YAAY,CAAC,CAAC,CACd,eAAe,CAAC,IAAI,CAIjB,mCAAqB,CACjB,WAAW,CAAC,KAAK,CAIzB,mCAAoC,CACnC,UAAU,CAAC,oDAAgF,CAC3F,UAAU,CAAC,sBAAqC,CAChD,WAAW,CAAC,cAA8C,CAC1D,KAAK,CAzTU,OAAa,CA0T5B,MAAM,CAAC,iBAAgC,CACvC,aAAa,CAAC,GAAG,CAGlB,UAAW,CACV,KAAK,CAlSkB,OAAgC,CAqSxD,aAAc,CACb,MAAM,CAAC,cAA+B,CACtC,sBAAsB,CAAC,GAAG,CAC1B,uBAAuB,CAAC,GAAG,CAC3B,aAAa,CAAC,IAAI,CAGnB,aAAc,CACb,MAAM,CAAC,cAA+B,CACtC,0BAA0B,CAAC,GAAG,CAC9B,yBAAyB,CAAC,GAAG,CAC7B,UAAU,CAAC,IAAI,CAGhB,kCAAmC,CAClC,eAAe,CAAC,OAAO,CACvB,cAAc,CAAC,CAAC,CAChB,MAAM,CAAC,cAA+B,CACtC,aAAa,CAAC,GAAG,CAGlB,+HAAgI,CAC/H,KAAK,CAnUoB,IAAsB,CAoU/C,eAAe,CAAC,IAAI,CAGrB,aAAc,CACb,eAAe,CAAC,OAAO,CACvB,cAAc,CAAC,CAAC,CAChB,MAAM,CAAC,cAA+B,CACtC,aAAa,CAAC,GAAG,CAGlB,gBAAiB,CAChB,MAAM,CAAC,GAAG,CACV,UAAU,CAAC,gEAAiH,CAG7H,mCAAoC,CA3TnC,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CA4T3D,uBAAwB,CA/TvB,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAgU3D,oBAAqB,CAnUpB,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAoU3D,eAAgB,CAvUf,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAwU3D,gGAAiG,CAChG,aAAa,CAAC,GAAG,CACjB,OAAO,CAAC,GAAG,CACX,WAAW,CAAC,cAAwB,CACpC,MAAM,CAAC,KAAK,CAGb,iRAAkR,CACjR,KAAK,CAAC,OAAO,CAGd,QAAS,CACR,WAAW,CAAC,OAAO,CAGpB,yBAA0B,CACzB,UAAU,CAAC,OAAa,CACxB,aAAa,CAAC,GAAG,CACjB,MAAM,CAAC,IAAI,CACX,OAAO,CAAC,GAAG,CACX,QAAQ,CAAC,IAAI,CACb,WAAW,CAAC,cAAuB,CACnC,MAAM,CAAC,KAAK,CAGb,8CAA+C,CAC9C,KAAK,CAjae,OAAa,CAoalC,8BAA+B,CAC9B,KAAK,CAAC,OAAiB,CAGxB,qBAAsB,CACrB,KAAK,CAAC,OAAgB,CAGvB,8CAA+C,CAC9C,KAAK,CAAC,OAA+B,CACrC,WAAW,CAAC,IAAI,CAGjB,kBAAmB,CAClB,KAAK,CAAC,OAAiB,CAGxB,IAAK,CACJ,OAAO,CAAC,IAAI,CACZ,aAAa,CAAC,GAAG",
"sources": ["extra.scss"],
"names": [],
"file": "extra.css"
}

View File

@ -0,0 +1,453 @@
// NOTE: Please use this file to perform modifications on default style sheets.
//
// You need to install the official Sass CLI tool:
// npm install -g sass
//
// Run this command to regenerate extra.css after you're finished with changes:
// sass --style=compressed extra.scss extra.css
//
// Alternatively you can use online services to regenerate extra.css.
// Default text color for page contents
$default-text-color: hsl(0,0%,30%);
// Page header, footer, table rows, inline codes and definition lists
$header-footer-background-color: hsl(0,0%,95%);
// Page header, footer links and navigation bar background
$header-footer-link-color: hsl(0,0%,40%);
// Doxygen navigation bar links
$navbar-link-color: $header-footer-background-color;
// Page content background color
$content-background-color: hsl(0,0%,100%);
// Bold, italic, h1, h2, ... and table of contents
$heading-color: hsl(0,0%,10%);
// Function, enum and macro definition separator
$def-separator-color: $header-footer-background-color;
// Base color hue
$base-hue: 24;
// Default color used for links
$default-link-color: hsl($base-hue,100%,50%);
// Doxygen navigation bar active tab
$tab-text-color: hsl(0,0%,100%);
$tab-background-color1: $default-link-color;
$tab-background-color2: lighten(adjust-hue($tab-background-color1, 10), 10%);
// Table borders
$default-border-color: $default-link-color;
// Table header
$table-text-color: $tab-text-color;
$table-background-color1: $tab-background-color1;
$table-background-color2: $tab-background-color2;
// Table of contents, data structure index and prototypes
$toc-background-color1: hsl(0,0%,90%);
$toc-background-color2: lighten($toc-background-color1, 5%);
// Function prototype parameters color
$prototype-param-color: darken($default-link-color, 25%);
// Message box color: note, pre, post and invariant
$box-note-color: hsl(103,80%,85%);
// Message box color: warning and attention
$box-warning-color: hsl(34,80%,85%);
// Message box color: deprecated and bug
$box-bug-color: hsl(333,80%,85%);
// Message box color: todo and test
$box-todo-color: hsl(200,80%,85%);
// Message box helper function
@mixin message-box($base-color){
background:linear-gradient(to bottom,lighten($base-color, 5%) 0%,$base-color 100%);
box-shadow:inset 0 0 32px darken($base-color, 5%);
color:darken($base-color, 67%);
border:2px solid desaturate(darken($base-color, 10%), 20%);
}
.sm-dox,.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted,.sm-dox ul a:hover {
background:none;
text-shadow:none;
}
.sm-dox a span.sub-arrow {
border-color:$navbar-link-color transparent transparent transparent;
}
.sm-dox a span.sub-arrow:active,.sm-dox a span.sub-arrow:focus,.sm-dox a span.sub-arrow:hover,.sm-dox a:hover span.sub-arrow {
border-color:$default-link-color transparent transparent transparent;
}
.sm-dox ul a span.sub-arrow:active,.sm-dox ul a span.sub-arrow:focus,.sm-dox ul a span.sub-arrow:hover,.sm-dox ul a:hover span.sub-arrow {
border-color:transparent transparent transparent $default-link-color;
}
.sm-dox ul a:hover {
background:$header-footer-link-color;
text-shadow:none;
}
.sm-dox ul.sm-nowrap a {
color:$default-text-color;
text-shadow:none;
}
#main-nav,#main-menu,#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code,.markdownTable code {
background:none;
}
#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,table.markdownTable td,table.markdownTable th,hr,.memSeparator {
border:none;
}
#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.reflist dt a.el,.levels span,.directory .levels span {
text-shadow:none;
}
.memdoc,dl.reflist dd {
box-shadow:none;
}
div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code,table.markdownTable code {
padding:0;
}
#nav-path,.directory .levels,span.lineno {
display:none;
}
html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),tr.markdownTableBody:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code,.markdownTableRowEven {
background:$header-footer-background-color;
}
body {
color:$default-text-color;
}
div.title {
font-size: 170%;
margin: 1em 0 0.5em 0;
}
h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {
color:$heading-color;
border-bottom:none;
}
h1 {
padding-top:0.5em;
font-size:150%;
}
h2 {
padding-top:0.5em;
margin-bottom:0;
font-size:130%;
}
h3 {
padding-top:0.5em;
margin-bottom:0;
font-size:110%;
}
.glfwheader {
font-size:16px;
min-height:64px;
max-width:920px;
padding:0 32px;
margin:0 auto;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;
align-content: stretch;
}
#glfwhome {
line-height:64px;
padding-right:48px;
color:$header-footer-link-color;
font-size:2.5em;
background:url("https://www.glfw.org/css/arrow.png") no-repeat right;
}
.glfwnavbar {
list-style-type:none;
margin:0 0 0 auto;
float:right;
}
#glfwhome,.glfwnavbar li {
float:left;
}
.glfwnavbar a,.glfwnavbar a:visited {
line-height:64px;
margin-left:2em;
display:block;
color:$header-footer-link-color;
}
.glfwnavbar {
padding-left: 0;
}
#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {
transition:.35s ease;
}
#titlearea,.footer {
color:$header-footer-link-color;
}
address.footer {
text-align:center;
padding:2em;
margin-top:3em;
}
#top {
background:$header-footer-link-color;
}
#main-nav {
max-width:960px;
margin:0 auto;
font-size:13px;
}
#main-menu {
max-width:920px;
margin:0 auto;
font-size:13px;
}
.memtitle {
display:none;
}
.memproto,.memname {
font-weight:bold;
text-shadow:none;
}
#main-menu {
min-height:36px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;
align-content: stretch;
}
#main-menu a:focus {
outline-style: none;
}
#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li {
color:$navbar-link-color;
}
#main-menu li ul.sm-nowrap li a {
color:$default-text-color;
}
#main-menu li ul.sm-nowrap li a:hover {
color:$default-link-color;
}
#main-menu > li:last-child {
margin: 0 0 0 auto;
}
.contents {
min-height:590px;
}
div.contents,div.header {
max-width:920px;
margin:0 auto;
padding:0 32px;
background:$content-background-color none;
}
table.doxtable th,table.markdownTable th,dl.reflist dt {
background:linear-gradient(to bottom,$table-background-color2 0%,$table-background-color1 100%);
box-shadow:inset 0 0 32px $table-background-color1;
text-shadow:0 -1px 1px darken($table-background-color1, 15%);
text-align:left;
color:$table-text-color;
}
dl.reflist dt a.el {
color:$default-link-color;
padding:.2em;
border-radius:4px;
background-color:lighten($default-link-color, 40%);
}
div.toc {
float:right;
width:35%;
}
@media screen and (max-width:600px) {
div.toc {
float:none;
width:inherit;
margin:0;
}
}
div.toc h3 {
font-size:1.17em;
}
div.toc ul {
padding-left:1.5em;
}
div.toc li {
font-size:1em;
padding-left:0;
list-style-type:disc;
}
div.toc {
li.level2, li.level3 {
margin-left:0.5em;
}
}
div.toc,.memproto,div.qindex,div.ah {
background:linear-gradient(to bottom,$toc-background-color2 0%,$toc-background-color1 100%);
box-shadow:inset 0 0 32px $toc-background-color1;
text-shadow:0 1px 1px lighten($toc-background-color2, 10%);
color:$heading-color;
border:2px solid $toc-background-color1;
border-radius:4px;
}
.paramname {
color:$prototype-param-color;
}
dl.reflist dt {
border:2px solid $default-border-color;
border-top-left-radius:4px;
border-top-right-radius:4px;
border-bottom:none;
}
dl.reflist dd {
border:2px solid $default-border-color;
border-bottom-right-radius:4px;
border-bottom-left-radius:4px;
border-top:none;
}
table.doxtable,table.markdownTable {
border-collapse:inherit;
border-spacing:0;
border:2px solid $default-border-color;
border-radius:4px;
}
a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,#main-menu a:hover,span.lineno a:hover {
color:$default-link-color;
text-decoration:none;
}
div.directory {
border-collapse:inherit;
border-spacing:0;
border:2px solid $default-border-color;
border-radius:4px;
}
hr,.memSeparator {
height:2px;
background:linear-gradient(to right,$def-separator-color 0%,darken($def-separator-color, 10%) 50%,$def-separator-color 100%);
}
dl.note,dl.pre,dl.post,dl.invariant {
@include message-box($box-note-color);
}
dl.warning,dl.attention {
@include message-box($box-warning-color);
}
dl.deprecated,dl.bug {
@include message-box($box-bug-color);
}
dl.todo,dl.test {
@include message-box($box-todo-color);
}
dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {
border-radius:4px;
padding:1em;
text-shadow:0 1px 1px hsl(0,0%,100%);
margin:1em 0;
}
.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited {
color:inherit;
}
div.line {
line-height:inherit;
}
div.fragment,pre.fragment {
background:hsl(0,0%,95%);
border-radius:4px;
border:none;
padding:1em;
overflow:auto;
border-left:4px solid hsl(0,0%,80%);
margin:1em 0;
}
.lineno a,.lineno a:visited,.line,pre.fragment {
color:$default-text-color;
}
span.preprocessor,span.comment {
color:hsl(193,100%,30%);
}
a.code,a.code:visited {
color:hsl(18,100%,45%);
}
span.keyword,span.keywordtype,span.keywordflow {
color:darken($default-text-color, 5%);
font-weight:bold;
}
span.stringliteral {
color:hsl(261,100%,30%);
}
code {
padding:.1em;
border-radius:4px;
}

View File

@ -0,0 +1,7 @@
<address class="footer">
<p>
Last update on $date for $projectname $projectnumber
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: build.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">build.md File Reference</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,217 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Building applications</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Building applications</div></div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#build_include">Including the GLFW header file</a><ul><li class="level2"><a href="#build_macros">GLFW header option macros</a></li>
</ul>
</li>
<li class="level1"><a href="#build_link">Link with the right libraries</a><ul><li class="level2"><a href="#build_link_win32">With Visual C++ and GLFW binaries</a></li>
<li class="level2"><a href="#build_link_mingw">With MinGW-w64 and GLFW binaries</a></li>
<li class="level2"><a href="#build_link_cmake_source">With CMake and GLFW source</a></li>
<li class="level2"><a href="#build_link_cmake_package">With CMake and installed GLFW binaries</a></li>
<li class="level2"><a href="#build_link_pkgconfig">With pkg-config and GLFW binaries on Unix</a></li>
<li class="level2"><a href="#build_link_xcode">With Xcode on macOS</a></li>
<li class="level2"><a href="#build_link_osx">With command-line or makefile on macOS</a></li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><p>This is about compiling and linking applications that use GLFW. For information on how to write such applications, start with the <a class="el" href="quick_guide.html">introductory tutorial</a>. For information on how to compile the GLFW library itself, see <a class="el" href="compile_guide.html">Compiling GLFW</a>.</p>
<p>This is not a tutorial on compilation or linking. It assumes basic understanding of how to compile and link a C program as well as how to use the specific compiler of your chosen development environment. The compilation and linking process should be explained in your C programming material and in the documentation for your development environment.</p>
<h1><a class="anchor" id="build_include"></a>
Including the GLFW header file</h1>
<p>You should include the GLFW header in the source files where you use OpenGL or GLFW.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
<div class="ttc" id="aglfw3_8h_html"><div class="ttname"><a href="glfw3_8h.html">glfw3.h</a></div><div class="ttdoc">The header of the GLFW 3 API.</div></div>
</div><!-- fragment --><p>This header defines all the constants and declares all the types and function prototypes of the GLFW API. By default, it also includes the OpenGL header from your development environment. See <a class="el" href="build_guide.html#build_macros">option macros</a> below for how to select OpenGL ES headers and more.</p>
<p>The GLFW header also defines any platform-specific macros needed by your OpenGL header, so that it can be included without needing any window system headers.</p>
<p>It does this only when needed, so if window system headers are included, the GLFW header does not try to redefine those symbols. The reverse is not true, i.e. <code>windows.h</code> cannot cope if any Win32 symbols have already been defined.</p>
<p>In other words:</p>
<ul>
<li>Use the GLFW header to include OpenGL or OpenGL ES headers portably</li>
<li>Do not include window system headers unless you will use those APIs directly</li>
<li>If you do need such headers, include them before the GLFW header</li>
</ul>
<p>If you are using an OpenGL extension loading library such as <a href="https://github.com/Dav1dde/glad">glad</a>, the extension loader header should be included before the GLFW one. GLFW attempts to detect any OpenGL or OpenGL ES header or extension loader header included before it and will then disable the inclusion of the default OpenGL header. Most extension loaders also define macros that disable similar headers below it.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;glad/gl.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
</div><!-- fragment --><p>Both of these mechanisms depend on the extension loader header defining a known macro. If yours doesn't or you don't know which one your users will pick, the <a class="el" href="build_guide.html#GLFW_INCLUDE_NONE">GLFW_INCLUDE_NONE</a> macro will explicitly prevent the GLFW header from including the OpenGL header. This will also allow you to include the two headers in any order.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_NONE</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;glad/gl.h&gt;</span></div>
</div><!-- fragment --><h2><a class="anchor" id="build_macros"></a>
GLFW header option macros</h2>
<p>These macros may be defined before the inclusion of the GLFW header and affect its behavior.</p>
<p><a class="anchor" id="GLFW_DLL"></a><b>GLFW_DLL</b> is required on Windows when using the GLFW DLL, to tell the compiler that the GLFW functions are defined in a DLL.</p>
<p>The following macros control which OpenGL or OpenGL ES API header is included. Only one of these may be defined at a time.</p>
<dl class="section note"><dt>Note</dt><dd>GLFW does not provide any of the API headers mentioned below. They are provided by your development environment or your OpenGL, OpenGL ES or Vulkan SDK, and most of them can be downloaded from the <a href="https://www.khronos.org/registry/">Khronos Registry</a>.</dd></dl>
<p><a class="anchor" id="GLFW_INCLUDE_GLCOREARB"></a><b>GLFW_INCLUDE_GLCOREARB</b> makes the GLFW header include the modern <code>GL/glcorearb.h</code> header (<code>OpenGL/gl3.h</code> on macOS) instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_ES1"></a><b>GLFW_INCLUDE_ES1</b> makes the GLFW header include the OpenGL ES 1.x <code>GLES/gl.h</code> header instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_ES2"></a><b>GLFW_INCLUDE_ES2</b> makes the GLFW header include the OpenGL ES 2.0 <code>GLES2/gl2.h</code> header instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_ES3"></a><b>GLFW_INCLUDE_ES3</b> makes the GLFW header include the OpenGL ES 3.0 <code>GLES3/gl3.h</code> header instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_ES31"></a><b>GLFW_INCLUDE_ES31</b> makes the GLFW header include the OpenGL ES 3.1 <code>GLES3/gl31.h</code> header instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_ES32"></a><b>GLFW_INCLUDE_ES32</b> makes the GLFW header include the OpenGL ES 3.2 <code>GLES3/gl32.h</code> header instead of the regular OpenGL header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_NONE"></a><b>GLFW_INCLUDE_NONE</b> makes the GLFW header not include any OpenGL or OpenGL ES API header. This is useful in combination with an extension loading library.</p>
<p>If none of the above inclusion macros are defined, the standard OpenGL <code>GL/gl.h</code> header (<code>OpenGL/gl.h</code> on macOS) is included, unless GLFW detects the inclusion guards of any OpenGL, OpenGL ES or extension loader header it knows about.</p>
<p>The following macros control the inclusion of additional API headers. Any number of these may be defined simultaneously, and/or together with one of the above macros.</p>
<p><a class="anchor" id="GLFW_INCLUDE_VULKAN"></a><b>GLFW_INCLUDE_VULKAN</b> makes the GLFW header include the Vulkan <code>vulkan/vulkan.h</code> header in addition to any selected OpenGL or OpenGL ES header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_GLEXT"></a><b>GLFW_INCLUDE_GLEXT</b> makes the GLFW header include the appropriate extension header for the OpenGL or OpenGL ES header selected above after and in addition to that header.</p>
<p><a class="anchor" id="GLFW_INCLUDE_GLU"></a><b>GLFW_INCLUDE_GLU</b> makes the header include the GLU header in addition to the header selected above. This should only be used with the standard OpenGL header and only for compatibility with legacy code. GLU has been deprecated and should not be used in new code.</p>
<dl class="section note"><dt>Note</dt><dd>None of these macros may be defined during the compilation of GLFW itself. If your build includes GLFW and you define any these in your build files, make sure they are not applied to the GLFW sources.</dd></dl>
<h1><a class="anchor" id="build_link"></a>
Link with the right libraries</h1>
<p>GLFW is essentially a wrapper of various platform-specific APIs and therefore needs to link against many different system libraries. If you are using GLFW as a shared library / dynamic library / DLL then it takes care of these links. However, if you are using GLFW as a static library then your executable will need to link against these libraries.</p>
<p>On Windows and macOS, the list of system libraries is static and can be hard-coded into your build environment. See the section for your development environment below. On Linux and other Unix-like operating systems, the list varies but can be retrieved in various ways as described below.</p>
<p>A good general introduction to linking is <a href="https://www.lurklurk.org/linkers/linkers.html">Beginner's Guide to Linkers</a> by David Drysdale.</p>
<h2><a class="anchor" id="build_link_win32"></a>
With Visual C++ and GLFW binaries</h2>
<p>If you are using a downloaded <a href="https://www.glfw.org/download.html">binary archive</a>, first make sure you have the archive matching the architecture you are building for (32-bit or 64-bit), or you will get link errors. Also make sure you are using the binaries for your version of Visual C++ or you may get other link errors.</p>
<p>There are two version of the static GLFW library in the binary archive, because it needs to use the same base run-time library variant as the rest of your executable.</p>
<p>One is named <code>glfw3.lib</code> and is for projects with the <em>Runtime Library</em> project option set to <em>Multi-threaded DLL</em> or <em>Multi-threaded Debug DLL</em>. The other is named <code>glfw3_mt.lib</code> and is for projects with <em>Runtime Library</em> set to <em>Multi-threaded</em> or <em>Multi-threaded Debug</em>. To use the static GLFW library you will need to add <code>path/to/glfw3.lib</code> or <code>path/to/glfw3_mt.lib</code> to the <em>Additional Dependencies</em> project option.</p>
<p>If you compiled a GLFW static library yourself then there will only be one, named <code>glfw3.lib</code>, and you have to make sure the run-time library variant matches.</p>
<p>The DLL version of the GLFW library is named <code>glfw3.dll</code>, but you will be linking against the <code>glfw3dll.lib</code> link library. To use the DLL you will need to add <code>path/to/glfw3dll.lib</code> to the <em>Additional Dependencies</em> project option. All of its dependencies are already listed there by default, but when building with the DLL version of GLFW, you also need to define the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a>. This can be done either in the <em>Preprocessor Definitions</em> project option or by defining it in your source code before including the GLFW header.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_DLL</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
</div><!-- fragment --><p>All link-time dependencies for GLFW are already listed in the <em>Additional Dependencies</em> option by default.</p>
<h2><a class="anchor" id="build_link_mingw"></a>
With MinGW-w64 and GLFW binaries</h2>
<p>This is intended for building a program from the command-line or by writing a makefile, on Windows with <a href="https://www.mingw-w64.org/">MinGW-w64</a> and GLFW binaries. These can be from a downloaded and extracted <a href="https://www.glfw.org/download.html">binary archive</a> or by compiling GLFW yourself. The paths below assume a binary archive is used.</p>
<p>If you are using a downloaded binary archive, first make sure you have the archive matching the architecture you are building for (32-bit or 64-bit) or you will get link errors.</p>
<p>Note that the order of source files and libraries matter for GCC. Dependencies must be listed after the files that depend on them. Any source files that depend on GLFW must be listed before the GLFW library. GLFW in turn depends on <code>gdi32</code> and must be listed before it.</p>
<p>If you are using the static version of the GLFW library, which is named <code>libglfw3.a</code>, do:</p>
<div class="fragment"><div class="line">gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3.a -lgdi32</div>
</div><!-- fragment --><p>If you are using the DLL version of the GLFW library, which is named <code>glfw3.dll</code>, you will need to use the <code>libglfw3dll.a</code> link library.</p>
<div class="fragment"><div class="line">gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32</div>
</div><!-- fragment --><p>The resulting executable will need to find <code>glfw3.dll</code> to run, typically by keeping both files in the same directory.</p>
<p>When you are building with the DLL version of GLFW, you will also need to define the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro. This can be done in your source files, as long as it done before including the GLFW header:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_DLL</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
</div><!-- fragment --><p>It can also be done on the command-line:</p>
<div class="fragment"><div class="line">gcc -o myprog myprog.c -D GLFW_DLL -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32</div>
</div><!-- fragment --><h2><a class="anchor" id="build_link_cmake_source"></a>
With CMake and GLFW source</h2>
<p>This section is about using CMake to compile and link GLFW along with your application. If you want to use an installed binary instead, see <a class="el" href="build_guide.html#build_link_cmake_package">With CMake and installed GLFW binaries</a>.</p>
<p>With a few changes to your <code>CMakeLists.txt</code> you can have the GLFW source tree built along with your application.</p>
<p>Add the root directory of the GLFW source tree to your project. This will add the <code>glfw</code> target to your project.</p>
<div class="fragment"><div class="line">add_subdirectory(path/to/glfw)</div>
</div><!-- fragment --><p>Once GLFW has been added, link your application against the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies as it is currently configured, the include directory for the GLFW header and, when applicable, the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro.</p>
<div class="fragment"><div class="line">target_link_libraries(myapp glfw)</div>
</div><!-- fragment --><p>Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, use the OpenGL CMake package.</p>
<div class="fragment"><div class="line">find_package(OpenGL REQUIRED)</div>
</div><!-- fragment --><p>If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like any other library.</p>
<div class="fragment"><div class="line">target_link_libraries(myapp OpenGL::GL)</div>
</div><!-- fragment --><p>For a minimal example of a program and GLFW sources built with CMake, see the <a href="https://github.com/juliettef/GLFW-CMake-starter">GLFW CMake Starter</a> on GitHub.</p>
<h2><a class="anchor" id="build_link_cmake_package"></a>
With CMake and installed GLFW binaries</h2>
<p>This section is about using CMake to link GLFW after it has been built and installed. If you want to build it along with your application instead, see <a class="el" href="build_guide.html#build_link_cmake_source">With CMake and GLFW source</a>.</p>
<p>With a few changes to your <code>CMakeLists.txt</code> you can locate the package and target files generated when GLFW is installed.</p>
<div class="fragment"><div class="line">find_package(glfw3 3.4 REQUIRED)</div>
</div><!-- fragment --><p>Once GLFW has been added to the project, link against it with the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies, the include directory for the GLFW header and, when applicable, the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro.</p>
<div class="fragment"><div class="line">target_link_libraries(myapp glfw)</div>
</div><!-- fragment --><p>Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, use the OpenGL CMake package.</p>
<div class="fragment"><div class="line">find_package(OpenGL REQUIRED)</div>
</div><!-- fragment --><p>If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like any other library.</p>
<div class="fragment"><div class="line">target_link_libraries(myapp OpenGL::GL)</div>
</div><!-- fragment --><h2><a class="anchor" id="build_link_pkgconfig"></a>
With pkg-config and GLFW binaries on Unix</h2>
<p>This is intended for building a program from the command-line or by writing a makefile, on macOS or any Unix-like system like Linux, FreeBSD and Cygwin.</p>
<p>GLFW supports <a href="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a>, and the <code>glfw3.pc</code> pkg-config file is generated when the GLFW library is built and is installed along with it. A pkg-config file describes all necessary compile-time and link-time flags and dependencies needed to use a library. When they are updated or if they differ between systems, you will get the correct ones automatically.</p>
<p>A typical compile and link command-line when using the static version of the GLFW library may look like this:</p>
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)</div>
</div><!-- fragment --><p>If you are using the shared version of the GLFW library, omit the <code>--static</code> flag.</p>
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>
</div><!-- fragment --><p>You can also use the <code>glfw3.pc</code> file without installing it first, by using the <code>PKG_CONFIG_PATH</code> environment variable.</p>
<div class="fragment"><div class="line">env PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>
</div><!-- fragment --><p>The dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, you should add the <code>gl</code> pkg-config package.</p>
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)</div>
</div><!-- fragment --><h2><a class="anchor" id="build_link_xcode"></a>
With Xcode on macOS</h2>
<p>If you are using the dynamic library version of GLFW, add it to the project dependencies.</p>
<p>If you are using the static library version of GLFW, add it and the Cocoa, OpenGL and IOKit frameworks to the project as dependencies. They can all be found in <code>/System/Library/Frameworks</code>.</p>
<h2><a class="anchor" id="build_link_osx"></a>
With command-line or makefile on macOS</h2>
<p>It is recommended that you use <a class="el" href="build_guide.html#build_link_pkgconfig">pkg-config</a> when using installed GLFW binaries from the command line on macOS. That way you will get any new dependencies added automatically. If you still wish to build manually, you need to add the required frameworks and libraries to your command-line yourself using the <code>-l</code> and <code>-framework</code> switches.</p>
<p>If you are using the dynamic GLFW library, which is named <code>libglfw.3.dylib</code>, do:</p>
<div class="fragment"><div class="line">cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit</div>
</div><!-- fragment --><p>If you are using the static library, named <code>libglfw3.a</code>, substitute <code>-lglfw3</code> for <code>-lglfw</code>.</p>
<p>Note that you do not add the <code>.framework</code> extension to a framework when linking against it from the command-line.</p>
<dl class="section note"><dt>Note</dt><dd>Your machine may have <code>libGL.*.dylib</code> style OpenGL library, but that is for the X Window System and will not work with the macOS native version of GLFW. </dd></dl>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: compat.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">compat.md File Reference</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,156 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Standards conformance</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Standards conformance</div></div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#compat_x11">X11 extensions, protocols and IPC standards</a></li>
<li class="level1"><a href="#compat_wayland">Wayland protocols and IPC standards</a></li>
<li class="level1"><a href="#compat_glx">GLX extensions</a></li>
<li class="level1"><a href="#compat_wgl">WGL extensions</a></li>
<li class="level1"><a href="#compat_osx">OpenGL on macOS</a></li>
<li class="level1"><a href="#compat_vulkan">Vulkan loader and API</a></li>
<li class="level1"><a href="#compat_wsi">Vulkan WSI extensions</a></li>
</ul>
</div>
<div class="textblock"><p>This guide describes the various API extensions used by this version of GLFW. It lists what are essentially implementation details, but which are nonetheless vital knowledge for developers intending to deploy their applications on a wide range of machines.</p>
<p>The information in this guide is not a part of GLFW API, but merely preconditions for some parts of the library to function on a given machine. Any part of this information may change in future versions of GLFW and that will not be considered a breaking API change.</p>
<h1><a class="anchor" id="compat_x11"></a>
X11 extensions, protocols and IPC standards</h1>
<p>As GLFW uses Xlib directly, without any intervening toolkit library, it has sole responsibility for interacting well with the many and varied window managers in use on Unix-like systems. In order for applications and window managers to work well together, a number of standards and conventions have been developed that regulate behavior outside the scope of the X11 API; most importantly the <a href="https://www.tronche.com/gui/x/icccm/">Inter-Client Communication Conventions Manual</a> (ICCCM) and <a href="https://standards.freedesktop.org/wm-spec/wm-spec-latest.html">Extended Window Manager Hints</a> (EWMH) standards.</p>
<p>GLFW uses the <code>_MOTIF_WM_HINTS</code> window property to support borderless windows. If the running window manager does not support this property, the <code>GLFW_DECORATED</code> hint will have no effect.</p>
<p>GLFW uses the ICCCM <code>WM_DELETE_WINDOW</code> protocol to intercept the user attempting to close the GLFW window. If the running window manager does not support this protocol, the close callback will never be called.</p>
<p>GLFW uses the EWMH <code>_NET_WM_PING</code> protocol, allowing the window manager notify the user when the application has stopped responding, i.e. when it has ceased to process events. If the running window manager does not support this protocol, the user will not be notified if the application locks up.</p>
<p>GLFW uses the EWMH <code>_NET_WM_STATE_FULLSCREEN</code> window state to tell the window manager to make the GLFW window full screen. If the running window manager does not support this state, full screen windows may not work properly. GLFW has a fallback code path in case this state is unavailable, but every window manager behaves slightly differently in this regard.</p>
<p>GLFW uses the EWMH <code>_NET_WM_BYPASS_COMPOSITOR</code> window property to tell a compositing window manager to un-redirect full screen GLFW windows. If the running window manager uses compositing but does not support this property then additional copying may be performed for each buffer swap of full screen windows.</p>
<p>GLFW uses the <a href="https://www.freedesktop.org/wiki/ClipboardManager/">clipboard manager protocol</a> to push a clipboard string (i.e. selection) owned by a GLFW window about to be destroyed to the clipboard manager. If there is no running clipboard manager, the clipboard string will be unavailable once the window has been destroyed.</p>
<p>GLFW uses the <a href="https://www.freedesktop.org/wiki/Specifications/XDND/">X drag-and-drop protocol</a> to provide file drop events. If the application originating the drag does not support this protocol, drag and drop will not work.</p>
<p>GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the running X server does not support this version of this extension, multi-monitor support will not function and only a single, desktop-spanning monitor will be reported.</p>
<p>GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp support. If the running X server does not support either or both of these extensions, gamma ramp support will not function.</p>
<p>GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard input. If the running X server does not support this extension, a non-Xkb fallback path is used.</p>
<p>GLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion when the cursor is disabled. If the running X server does not support this extension, regular accelerated mouse motion will be used.</p>
<p>GLFW uses both the XRender extension and the compositing manager to support transparent window framebuffers. If the running X server does not support this extension or there is no running compositing manager, the <code>GLFW_TRANSPARENT_FRAMEBUFFER</code> framebuffer hint will have no effect.</p>
<p>GLFW uses both the Xcursor extension and the freedesktop cursor conventions to provide an expanded set of standard cursor shapes. If the running X server does not support this extension or the current cursor theme does not support the conventions, the <code>GLFW_RESIZE_NWSE_CURSOR</code>, <code>GLFW_RESIZE_NESW_CURSOR</code> and <code>GLFW_NOT_ALLOWED_CURSOR</code> shapes will not be available and other shapes may use legacy images.</p>
<h1><a class="anchor" id="compat_wayland"></a>
Wayland protocols and IPC standards</h1>
<p>As GLFW uses libwayland directly, without any intervening toolkit library, it has sole responsibility for interacting well with every compositor in use on Unix-like systems. Most of the features are provided by the core protocol, while cursor support is provided by the libwayland-cursor helper library, EGL integration by libwayland-egl, and keyboard handling by <a href="https://xkbcommon.org/">libxkbcommon</a>. In addition, GLFW uses some additional Wayland protocols to implement certain features if the compositor supports them.</p>
<p>GLFW uses xkbcommon 0.5.0 to provide key and text input support. Earlier versions are not supported.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/xdg-shell">xdg-shell</a> protocol to provide better window management. This protocol is mandatory for GLFW to display a window.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/relative-pointer-unstable-v1">relative-pointer-unstable-v1</a> protocol alongside the <a href="https://wayland.app/protocols/pointer-constraints-unstable-v1">pointer-constraints-unstable-v1</a> protocol to implement disabled cursor. If the running compositor does not support both of these protocols, disabling the cursor will have no effect.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/idle-inhibit-unstable-v1">idle-inhibit-unstable-v1</a> protocol to prohibit the screensaver from starting. If the running compositor does not support this protocol, the screensaver may start even for full screen windows.</p>
<p>GLFW uses the <a href="https://gitlab.freedesktop.org/libdecor/libdecor">libdecor</a> library for window decorations, where available. This in turn provides good quality client-side decorations (drawn by the application) on desktop systems that do not support server-side decorations (drawn by the window manager). On systems that do not provide either libdecor or xdg-decoration, very basic window decorations are provided. These do not include the window title or any caption buttons.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/xdg-decoration-unstable-v1">xdg-decoration-unstable-v1</a> protocol to request decorations to be drawn around its windows. This protocol is part of wayland-protocols 1.15, and mandatory at build time. If the running compositor does not support this protocol, a very simple frame will be drawn by GLFW itself, using the <a href="https://wayland.app/protocols/viewporter">viewporter</a> protocol alongside subsurfaces. If the running compositor does not support these protocols either, no decorations will be drawn around windows.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/xdg-activation-v1">xdg-activation-v1</a> protocol to implement window focus and attention requests. If the running compositor does not support this protocol, window focus and attention requests do nothing.</p>
<p>GLFW uses the <a href="https://wayland.app/protocols/fractional-scale-v1">fractional-scale-v1</a> protocol to implement fine-grained framebuffer scaling. If the running compositor does not support this protocol, the <a class="el" href="group__window.html#gaa5a9c6b4722670fd33d6e8a88f2e21bc">GLFW_SCALE_FRAMEBUFFER</a> window hint will only be able to scale the framebuffer by integer scales. This will typically be the smallest integer not less than the actual scale.</p>
<h1><a class="anchor" id="compat_glx"></a>
GLX extensions</h1>
<p>The GLX API is the default API used to create OpenGL contexts on Unix-like systems using the X Window System.</p>
<p>GLFW uses the GLX 1.3 <code>GLXFBConfig</code> functions to enumerate and select framebuffer pixel formats. If GLX 1.3 is not supported, <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> will fail.</p>
<p>GLFW uses the <code>GLX_MESA_swap_control,</code> <code>GLX_EXT_swap_control</code> and <code>GLX_SGI_swap_control</code> extensions to provide vertical retrace synchronization (or <em>vsync</em>), in that order of preference. When none of these extensions are available, calling <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> will have no effect.</p>
<p>GLFW uses the <code>GLX_ARB_multisample</code> extension to create contexts with multisampling anti-aliasing. Where this extension is unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>
<p>GLFW uses the <code>GLX_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_CONTEXT_DEBUG</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
<p>GLFW uses the <code>GLX_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code>, or setting <code>GLFW_CLIENT_API</code> to anything but <code>GLFW_OPENGL_API</code> or <code>GLFW_NO_API</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
<p>GLFW uses the <code>GLX_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>
<p>GLFW uses the <code>GLX_ARB_framebuffer_sRGB</code> and <code>GLX_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. Where both of these extensions are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>
<h1><a class="anchor" id="compat_wgl"></a>
WGL extensions</h1>
<p>The WGL API is used to create OpenGL contexts on Microsoft Windows and other implementations of the Win32 API, such as Wine.</p>
<p>GLFW uses either the <code>WGL_EXT_extension_string</code> or the <code>WGL_ARB_extension_string</code> extension to check for the presence of all other WGL extensions listed below. If both are available, the EXT one is preferred. If neither is available, no other extensions are used and many GLFW features related to context creation will have no effect or cause errors when used.</p>
<p>GLFW uses the <code>WGL_EXT_swap_control</code> extension to provide vertical retrace synchronization (or <em>vsync</em>). Where this extension is unavailable, calling <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> will have no effect.</p>
<p>GLFW uses the <code>WGL_ARB_pixel_format</code> and <code>WGL_ARB_multisample</code> extensions to create contexts with multisampling anti-aliasing. Where these extensions are unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>
<p>GLFW uses the <code>WGL_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_CONTEXT_DEBUG</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
<p>GLFW uses the <code>WGL_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
<p>GLFW uses the <code>WGL_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>
<p>GLFW uses the <code>WGL_ARB_framebuffer_sRGB</code> and <code>WGL_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. When both of these extensions are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>
<h1><a class="anchor" id="compat_osx"></a>
OpenGL on macOS</h1>
<p>Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then only forward-compatible, core profile contexts are supported. Support for OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible, core profile contexts. There is also still no mechanism for requesting debug contexts or no-error contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL version 2.1.</p>
<p>Because of this, on OS X 10.7 and later, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail if given version 3.0 or 3.1. The <code>GLFW_OPENGL_PROFILE</code> hint must be set to <code>GLFW_OPENGL_CORE_PROFILE</code> when creating OpenGL 3.2 and later contexts. The <code>GLFW_CONTEXT_DEBUG</code> and <code>GLFW_CONTEXT_NO_ERROR</code> hints are ignored.</p>
<p>Also, on Mac OS X 10.6 and below, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will fail if given a version above 2.1, setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to a non-default value will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail and the <code>GLFW_CONTEXT_DEBUG</code> hint is ignored.</p>
<h1><a class="anchor" id="compat_vulkan"></a>
Vulkan loader and API</h1>
<p>By default, GLFW uses the standard system-wide Vulkan loader to access the Vulkan API on all platforms except macOS. This is installed by both graphics drivers and Vulkan SDKs. If either the loader or at least one minimally functional ICD is missing, <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> will return <code>GLFW_FALSE</code> and all other Vulkan-related functions will fail with an <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error.</p>
<h1><a class="anchor" id="compat_wsi"></a>
Vulkan WSI extensions</h1>
<p>The Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on all supported platforms.</p>
<p>GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_win32_surface</code> extensions to create surfaces on Microsoft Windows. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
<p>GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_MVK_macos_surface</code> or <code>VK_EXT_metal_surface</code> extensions to create surfaces on macOS. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
<p>GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_KHR_xlib_surface</code> or <code>VK_KHR_xcb_surface</code> extensions to create surfaces on X11. If <code>VK_KHR_surface</code> or both <code>VK_KHR_xlib_surface</code> and <code>VK_KHR_xcb_surface</code> are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
<p>GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_wayland_surface</code> extensions to create surfaces on Wayland. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: compile.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">compile.md File Reference</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,219 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Compiling GLFW</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Compiling GLFW</div></div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#compile_cmake">Using CMake</a><ul><li class="level2"><a href="#compile_deps">Installing dependencies</a><ul><li class="level3"><a href="#compile_deps_wayland">Dependencies for Wayland and X11</a></li>
</ul>
</li>
<li class="level2"><a href="#compile_generate">Generating build files with CMake</a><ul><li class="level3"><a href="#compile_generate_gui">Generating with the CMake GUI</a></li>
<li class="level3"><a href="#compile_generate_cli">Generating with command-line CMake</a></li>
</ul>
</li>
<li class="level2"><a href="#compile_compile">Compiling the library</a></li>
</ul>
</li>
<li class="level1"><a href="#compile_options">CMake options</a><ul><li class="level2"><a href="#compile_options_shared">Shared CMake options</a></li>
<li class="level2"><a href="#compile_options_win32">Win32 specific CMake options</a></li>
<li class="level2"><a href="#compile_options_macos">macOS specific CMake options</a></li>
<li class="level2"><a href="#compile_options_unix">Unix-like system specific CMake options</a></li>
</ul>
</li>
<li class="level1"><a href="#compile_mingw_cross">Cross-compilation with CMake and MinGW</a></li>
<li class="level1"><a href="#compile_manual">Compiling GLFW manually</a></li>
</ul>
</div>
<div class="textblock"><p>This is about compiling the GLFW library itself. For information on how to build applications that use GLFW, see <a class="el" href="build_guide.html">Building applications</a>.</p>
<p>GLFW uses some C99 features and does not support Visual Studio 2012 and earlier.</p>
<h1><a class="anchor" id="compile_cmake"></a>
Using CMake</h1>
<p>GLFW behaves like most other libraries that use CMake so this guide mostly describes the standard configure, generate and compile sequence. If you are already familiar with this from other projects, you may want to focus on the <a class="el" href="compile_guide.html#compile_deps">Installing dependencies</a> and <a class="el" href="compile_guide.html#compile_options">CMake options</a> sections for GLFW-specific information.</p>
<p>GLFW uses <a href="https://cmake.org/">CMake</a> to generate project files or makefiles for your chosen development environment. To compile GLFW, first generate these files with CMake and then use them to compile the GLFW library.</p>
<p>If you are on Windows and macOS you can <a href="https://cmake.org/download/">download CMake</a> from their site.</p>
<p>If you are on a Unix-like system such as Linux, FreeBSD or Cygwin or have a package system like Fink, MacPorts or Homebrew, you can install its CMake package.</p>
<p>CMake is a complex tool and this guide will only show a few of the possible ways to set up and compile GLFW. The CMake project has their own much more detailed <a href="https://cmake.org/cmake/help/latest/guide/user-interaction/">CMake user guide</a> that includes everything in this guide not specific to GLFW. It may be a useful companion to this one.</p>
<h2><a class="anchor" id="compile_deps"></a>
Installing dependencies</h2>
<p>The C/C++ development environments in Visual Studio, Xcode and MinGW come with all necessary dependencies for compiling GLFW, but on Unix-like systems like Linux and FreeBSD you will need a few extra packages.</p>
<h3><a class="anchor" id="compile_deps_wayland"></a>
Dependencies for Wayland and X11</h3>
<p>By default, both the Wayland and X11 backends are enabled on Linux and other Unix-like systems (except macOS). To disable one or both of these, set the <a class="el" href="compile_guide.html#GLFW_BUILD_WAYLAND">GLFW_BUILD_WAYLAND</a> or <a class="el" href="compile_guide.html#GLFW_BUILD_X11">GLFW_BUILD_X11</a> CMake options in the next step when generating build files.</p>
<p>To compile GLFW for both Wayland and X11, you need to have the X11, Wayland and xkbcommon development packages installed. On some systems a few other packages are also required. None of the development packages above are needed to build or run programs that use an already compiled GLFW library.</p>
<p>On Debian and derivatives like Ubuntu and Linux Mint you will need the <code>libwayland-dev</code> and <code>libxkbcommon-dev</code> packages to compile for Wayland and the <code>xorg-dev</code> meta-package to compile for X11. These will pull in all other dependencies.</p>
<div class="fragment"><div class="line">sudo apt install libwayland-dev libxkbcommon-dev xorg-dev</div>
</div><!-- fragment --><p>On Fedora and derivatives like Red Hat you will need the <code>wayland-devel</code> and <code>libxkbcommon-devel</code> packages to compile for Wayland and the <code>libXcursor-devel</code>, <code>libXi-devel</code>, <code>libXinerama-devel</code> and <code>libXrandr-devel</code> packages to compile for X11. These will pull in all other dependencies.</p>
<div class="fragment"><div class="line">sudo dnf install wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel</div>
</div><!-- fragment --><p>On FreeBSD you will need the <code>wayland</code>, <code>libxkbcommon</code> and <code>evdev-proto</code> packages to compile for Wayland. The X11 headers are installed along the end-user X11 packages, so if you have an X server running you should have the headers as well. If not, install the <code>xorgproto</code> package to compile for X11.</p>
<div class="fragment"><div class="line">pkg install wayland libxkbcommon evdev-proto xorgproto</div>
</div><!-- fragment --><p>On Cygwin Wayland is not supported but you will need the <code>libXcursor-devel</code>, <code>libXi-devel</code>, <code>libXinerama-devel</code>, <code>libXrandr-devel</code> and <code>libXrender-devel</code> packages to compile for X11. These can be found in the Libs section of the GUI installer and will pull in all other dependencies.</p>
<p>Once you have the required dependencies, move on to <a class="el" href="compile_guide.html#compile_generate">Generating build files with CMake</a>.</p>
<h2><a class="anchor" id="compile_generate"></a>
Generating build files with CMake</h2>
<p>Once you have all necessary dependencies it is time to generate the project files or makefiles for your development environment. CMake needs two paths for this:</p>
<ul>
<li>the path to the root directory of the GLFW source tree (not its <code>src</code> subdirectory)</li>
<li>the path to the directory where the generated build files and compiled binaries will be placed</li>
</ul>
<p>If these are the same, it is called an in-tree build, otherwise it is called an out-of-tree build.</p>
<p>Out-of-tree builds are recommended as they avoid cluttering up the source tree. They also allow you to have several build directories for different configurations all using the same source tree.</p>
<p>A common pattern when building a single configuration is to have a build directory named <code>build</code> in the root of the source tree.</p>
<h3><a class="anchor" id="compile_generate_gui"></a>
Generating with the CMake GUI</h3>
<p>Start the CMake GUI and set the paths to the source and build directories described above. Then press <em>Configure</em> and <em>Generate</em>.</p>
<p>If you wish change any CMake variables in the list, press <em>Configure</em> and then <em>Generate</em> to have the new values take effect. The variable list will be populated after the first configure step.</p>
<p>By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than macOS. To disable support for one or both of these, set the <a class="el" href="compile_guide.html#GLFW_BUILD_WAYLAND">GLFW_BUILD_WAYLAND</a> and/or <a class="el" href="compile_guide.html#GLFW_BUILD_X11">GLFW_BUILD_X11</a> option in the GLFW section of the variable list, then apply the new value as described above.</p>
<p>Once you have generated the project files or makefiles for your chosen development environment, move on to <a class="el" href="compile_guide.html#compile_compile">Compiling the library</a>.</p>
<h3><a class="anchor" id="compile_generate_cli"></a>
Generating with command-line CMake</h3>
<p>To make a build directory, pass the source and build directories to the <code>cmake</code> command. These can be relative or absolute paths. The build directory is created if it doesn't already exist.</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build</div>
</div><!-- fragment --><p>It is common to name the build directory <code>build</code> and place it in the root of the source tree when only planning to build a single configuration.</p>
<div class="fragment"><div class="line">cd path/to/glfw</div>
<div class="line">cmake -S . -B build</div>
</div><!-- fragment --><p>Without other flags these will generate Visual Studio project files on Windows and makefiles on other platforms. You can choose other targets using the <code>-G</code> flag.</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -G Xcode</div>
</div><!-- fragment --><p>By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than macOS. To disable support for one or both of these, set the <a class="el" href="compile_guide.html#GLFW_BUILD_WAYLAND">GLFW_BUILD_WAYLAND</a> and/or <a class="el" href="compile_guide.html#GLFW_BUILD_X11">GLFW_BUILD_X11</a> CMake option.</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_X11=0</div>
</div><!-- fragment --><p>Once you have generated the project files or makefiles for your chosen development environment, move on to <a class="el" href="compile_guide.html#compile_compile">Compiling the library</a>.</p>
<h2><a class="anchor" id="compile_compile"></a>
Compiling the library</h2>
<p>You should now have all required dependencies and the project files or makefiles necessary to compile GLFW. Go ahead and compile the actual GLFW library with these files as you would with any other project.</p>
<p>With Visual Studio open <code>GLFW.sln</code> and use the Build menu. With Xcode open <code>GLFW.xcodeproj</code> and use the Project menu.</p>
<p>With Linux, macOS and other forms of Unix, run <code>make</code>.</p>
<div class="fragment"><div class="line">cd path/to/build</div>
<div class="line">make</div>
</div><!-- fragment --><p>With MinGW, it is <code>mingw32-make</code>.</p>
<div class="fragment"><div class="line">cd path/to/build</div>
<div class="line">mingw32-make</div>
</div><!-- fragment --><p>Any CMake build directory can also be built with the <code>cmake</code> command and the <code>--build</code> flag.</p>
<div class="fragment"><div class="line">cmake --build path/to/build</div>
</div><!-- fragment --><p>This will run the platform specific build tool the directory was generated for.</p>
<p>Once the GLFW library is compiled you are ready to build your application, linking it to the GLFW library. See <a class="el" href="build_guide.html">Building applications</a> for more information.</p>
<h1><a class="anchor" id="compile_options"></a>
CMake options</h1>
<p>The CMake files for GLFW provide a number of options, although not all are available on all supported platforms. Some of these are de facto standards among projects using CMake and so have no <code>GLFW_</code> prefix.</p>
<p>If you are using the GUI version of CMake, these are listed and can be changed from there. If you are using the command-line version of CMake you can use the <code>ccmake</code> ncurses GUI to set options. Some package systems like Ubuntu and other distributions based on Debian GNU/Linux have this tool in a separate <code>cmake-curses-gui</code> package.</p>
<p>Finally, if you don't want to use any GUI, you can set options from the <code>cmake</code> command-line with the <code>-D</code> flag.</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D BUILD_SHARED_LIBS=ON</div>
</div><!-- fragment --><h2><a class="anchor" id="compile_options_shared"></a>
Shared CMake options</h2>
<p><a class="anchor" id="BUILD_SHARED_LIBS"></a><b>BUILD_SHARED_LIBS</b> determines whether GLFW is built as a static library or as a DLL / shared library / dynamic library. This is disabled by default, producing a static GLFW library. This variable has no <code>GLFW_</code> prefix because it is defined by CMake. If you want to change the library only for GLFW when it is part of a larger project, see <a class="el" href="compile_guide.html#GLFW_LIBRARY_TYPE">GLFW_LIBRARY_TYPE</a>.</p>
<p><a class="anchor" id="GLFW_LIBRARY_TYPE"></a><b>GLFW_LIBRARY_TYPE</b> allows you to override <a class="el" href="compile_guide.html#BUILD_SHARED_LIBS">BUILD_SHARED_LIBS</a> only for GLFW, without affecting other libraries in a larger project. When set, the value of this option must be a valid CMake library type. Set it to <code>STATIC</code> to build GLFW as a static library, <code>SHARED</code> to build it as a shared library / dynamic library / DLL, or <code>OBJECT</code> to make GLFW a CMake object library.</p>
<p><a class="anchor" id="GLFW_BUILD_EXAMPLES"></a><b>GLFW_BUILD_EXAMPLES</b> determines whether the GLFW examples are built along with the library. This is enabled by default unless GLFW is being built as a subproject of a larger CMake project.</p>
<p><a class="anchor" id="GLFW_BUILD_TESTS"></a><b>GLFW_BUILD_TESTS</b> determines whether the GLFW test programs are built along with the library. This is enabled by default unless GLFW is being built as a subproject of a larger CMake project.</p>
<p><a class="anchor" id="GLFW_BUILD_DOCS"></a><b>GLFW_BUILD_DOCS</b> determines whether the GLFW documentation is built along with the library. This is enabled by default if <a href="https://www.doxygen.nl/">Doxygen</a> is found by CMake during configuration.</p>
<h2><a class="anchor" id="compile_options_win32"></a>
Win32 specific CMake options</h2>
<p><a class="anchor" id="GLFW_BUILD_WIN32"></a><b>GLFW_BUILD_WIN32</b> determines whether to include support for Win32 when compiling the library. This option is only available when compiling for Windows. This is enabled by default.</p>
<p><a class="anchor" id="USE_MSVC_RUNTIME_LIBRARY_DLL"></a><b>USE_MSVC_RUNTIME_LIBRARY_DLL</b> determines whether to use the DLL version or the static library version of the Visual C++ runtime library. When enabled, the DLL version of the Visual C++ library is used. This is enabled by default.</p>
<p>On CMake 3.15 and later you can set the standard CMake <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html">CMAKE_MSVC_RUNTIME_LIBRARY</a> variable instead of this GLFW-specific option.</p>
<p><a class="anchor" id="GLFW_USE_HYBRID_HPG"></a><b>GLFW_USE_HYBRID_HPG</b> determines whether to export the <code>NvOptimusEnablement</code> and <code>AmdPowerXpressRequestHighPerformance</code> symbols, which force the use of the high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols need to be exported by the EXE to be detected by the driver, so the override will not work if GLFW is built as a DLL. This is disabled by default, letting the operating system and driver decide.</p>
<h2><a class="anchor" id="compile_options_macos"></a>
macOS specific CMake options</h2>
<p><a class="anchor" id="GLFW_BUILD_COCOA"></a><b>GLFW_BUILD_COCOA</b> determines whether to include support for Cocoa when compiling the library. This option is only available when compiling for macOS. This is enabled by default.</p>
<h2><a class="anchor" id="compile_options_unix"></a>
Unix-like system specific CMake options</h2>
<p><a class="anchor" id="GLFW_BUILD_WAYLAND"></a><b>GLFW_BUILD_WAYLAND</b> determines whether to include support for Wayland when compiling the library. This option is only available when compiling for Linux and other Unix-like systems other than macOS. This is enabled by default.</p>
<p><a class="anchor" id="GLFW_BUILD_X11"></a><b>GLFW_BUILD_X11</b> determines whether to include support for X11 when compiling the library. This option is only available when compiling for Linux and other Unix-like systems other than macOS. This is enabled by default.</p>
<h1><a class="anchor" id="compile_mingw_cross"></a>
Cross-compilation with CMake and MinGW</h1>
<p>Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For example, Cygwin has the <code>mingw64-i686-gcc</code> and <code>mingw64-x86_64-gcc</code> packages for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives like Ubuntu have the <code>mingw-w64</code> package for both.</p>
<p>GLFW has CMake toolchain files in the <code>CMake</code> subdirectory that set up cross-compilation of Windows binaries. To use these files you set the <code>CMAKE_TOOLCHAIN_FILE</code> CMake variable with the <code>-D</code> flag add an option when configuring and generating the build files.</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=path/to/file</div>
</div><!-- fragment --><p>The exact toolchain file to use depends on the prefix used by the MinGW or MinGW-w64 binaries on your system. You can usually see this in the /usr directory. For example, both the Ubuntu and Cygwin MinGW-w64 packages have <code>/usr/x86_64-w64-mingw32</code> for the 64-bit compilers, so the correct invocation would be:</p>
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake</div>
</div><!-- fragment --><p>The path to the toolchain file is relative to the path to the GLFW source tree passed to the <code>-S</code> flag, not to the current directory.</p>
<p>For more details see the <a href="https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html">CMake toolchain guide</a>.</p>
<h1><a class="anchor" id="compile_manual"></a>
Compiling GLFW manually</h1>
<p>If you wish to compile GLFW without its CMake build environment then you will have to do at least some platform-detection yourself. There are preprocessor macros for enabling support for the platforms (window systems) available. There are also optional, platform-specific macros for various features.</p>
<p>When building, GLFW will expect the necessary configuration macros to be defined on the command-line. The GLFW CMake files set these as private compile definitions on the GLFW target but if you compile the GLFW sources manually you will need to define them yourself.</p>
<p>The window system is used to create windows, handle input, monitors, gamma ramps and clipboard. The options are:</p>
<ul>
<li><b>_GLFW_COCOA</b> to use the Cocoa frameworks</li>
<li><b>_GLFW_WIN32</b> to use the Win32 API</li>
<li><b>_GLFW_WAYLAND</b> to use the Wayland protocol</li>
<li><b>_GLFW_X11</b> to use the X Window System</li>
</ul>
<p>The <b>_GLFW_WAYLAND</b> and <b>_GLFW_X11</b> macros may be combined and produces a library that attempts to detect the appropriate platform at initialization.</p>
<p>If you are building GLFW as a shared library / dynamic library / DLL then you must also define <b>_GLFW_BUILD_DLL</b>. Otherwise, you must not define it.</p>
<p>If you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1 or GLESv2 library, you can override the default names by defining those you need of <b>_GLFW_VULKAN_LIBRARY</b>, <b>_GLFW_EGL_LIBRARY</b>, <b>_GLFW_GLX_LIBRARY</b>, <b>_GLFW_OSMESA_LIBRARY</b>, <b>_GLFW_OPENGL_LIBRARY</b>, <b>_GLFW_GLESV1_LIBRARY</b> and <b>_GLFW_GLESV2_LIBRARY</b>. Otherwise, GLFW will use the built-in default names.</p>
<dl class="section note"><dt>Note</dt><dd>None of the <a class="el" href="build_guide.html#build_macros">GLFW header option macros</a> may be defined during the compilation of GLFW. If you define any of these in your build files, make sure they are not applied to the GLFW sources. </dd></dl>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: context.md File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">context.md File Reference</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,258 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Context guide</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Context guide</div></div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#context_object">Context objects</a><ul><li class="level2"><a href="#context_hints">Context creation hints</a></li>
<li class="level2"><a href="#context_sharing">Context object sharing</a></li>
<li class="level2"><a href="#context_offscreen">Offscreen contexts</a></li>
<li class="level2"><a href="#context_less">Windows without contexts</a></li>
</ul>
</li>
<li class="level1"><a href="#context_current">Current context</a></li>
<li class="level1"><a href="#context_swap">Buffer swapping</a></li>
<li class="level1"><a href="#context_glext">OpenGL and OpenGL ES extensions</a><ul><li class="level2"><a href="#context_glext_auto">Loading extension with a loader library</a></li>
<li class="level2"><a href="#context_glext_manual">Loading extensions manually</a><ul><li class="level3"><a href="#context_glext_header">The glext.h header</a></li>
<li class="level3"><a href="#context_glext_string">Checking for extensions</a></li>
<li class="level3"><a href="#context_glext_proc">Fetching function pointers</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><p>This guide introduces the OpenGL and OpenGL ES context related functions of GLFW. For details on a specific function in this category, see the <a class="el" href="group__context.html">Context reference</a>. There are also guides for the other areas of the GLFW API.</p>
<ul>
<li><a class="el" href="intro_guide.html">Introduction to the API</a></li>
<li><a class="el" href="window_guide.html">Window guide</a></li>
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
<li><a class="el" href="monitor_guide.html">Monitor guide</a></li>
<li><a class="el" href="input_guide.html">Input guide</a></li>
</ul>
<h1><a class="anchor" id="context_object"></a>
Context objects</h1>
<p>A window object encapsulates both a top-level window and an OpenGL or OpenGL ES context. It is created with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> and destroyed with <a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a> or <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>. See <a class="el" href="window_guide.html#window_creation">Window creation</a> for more information.</p>
<p>As the window and context are inseparably linked, the window object also serves as the context handle.</p>
<p>To test the creation of various kinds of contexts and see their properties, run the <code>glfwinfo</code> test program.</p>
<dl class="section note"><dt>Note</dt><dd>Vulkan does not have a context and the Vulkan instance is created via the Vulkan API itself. If you will be using Vulkan to render to a window, disable context creation by setting the <a class="el" href="window_guide.html#GLFW_CLIENT_API_hint">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>. For more information, see the <a class="el" href="vulkan_guide.html">Vulkan guide</a>.</dd></dl>
<h2><a class="anchor" id="context_hints"></a>
Context creation hints</h2>
<p>There are a number of hints, specified using <a class="el" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>, related to what kind of context is created. See <a class="el" href="window_guide.html#window_hints_ctx">context related hints</a> in the window guide.</p>
<h2><a class="anchor" id="context_sharing"></a>
Context object sharing</h2>
<p>When creating a window and its OpenGL or OpenGL ES context with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>, you can specify another window whose context the new one should share its objects (textures, vertex and element buffers, etc.) with.</p>
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* second_window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">&quot;Second Window&quot;</span>, NULL, first_window);</div>
<div class="ttc" id="agroup__window_html_ga3555a418df92ad53f917597fe2f64aeb"><div class="ttname"><a href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a></div><div class="ttdeci">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class="ttdoc">Creates a window and its associated context.</div></div>
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1403</div></div>
</div><!-- fragment --><p>Object sharing is implemented by the operating system and graphics driver. On platforms where it is possible to choose which types of objects are shared, GLFW requests that all types are shared.</p>
<p>See the relevant chapter of the <a href="https://www.opengl.org/registry/">OpenGL</a> or <a href="https://www.khronos.org/opengles/">OpenGL ES</a> reference documents for more information. The name and number of this chapter unfortunately varies between versions and APIs, but has at times been named <em>Shared Objects and Multiple Contexts</em>.</p>
<p>GLFW comes with a bare-bones object sharing example program called <code>sharing</code>.</p>
<h2><a class="anchor" id="context_offscreen"></a>
Offscreen contexts</h2>
<p>GLFW doesn't support creating contexts without an associated window. However, contexts with hidden windows can be created with the <a class="el" href="window_guide.html#GLFW_VISIBLE_hint">GLFW_VISIBLE</a> window hint.</p>
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
<div class="line"> </div>
<div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* offscreen_context = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">&quot;&quot;</span>, NULL, NULL);</div>
<div class="ttc" id="agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5"><div class="ttname"><a href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a></div><div class="ttdeci">#define GLFW_FALSE</div><div class="ttdoc">Zero.</div><div class="ttdef"><b>Definition</b> glfw3.h:321</div></div>
<div class="ttc" id="agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033"><div class="ttname"><a href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a></div><div class="ttdeci">void glfwWindowHint(int hint, int value)</div><div class="ttdoc">Sets the specified window hint to the desired value.</div></div>
<div class="ttc" id="agroup__window_html_gafb3cdc45297e06d8f1eb13adc69ca6c4"><div class="ttname"><a href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a></div><div class="ttdeci">#define GLFW_VISIBLE</div><div class="ttdoc">Window visibility window hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:876</div></div>
</div><!-- fragment --><p>The window never needs to be shown and its context can be used as a plain offscreen context. Depending on the window manager, the size of a hidden window's framebuffer may not be usable or modifiable, so framebuffer objects are recommended for rendering with such contexts.</p>
<p>You should still <a class="el" href="input_guide.html#events">process events</a> as long as you have at least one window, even if none of them are visible.</p>
<h2><a class="anchor" id="context_less"></a>
Windows without contexts</h2>
<p>You can disable context creation by setting the <a class="el" href="window_guide.html#GLFW_CLIENT_API_hint">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>.</p>
<p>Windows without contexts should not be passed to <a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a> or <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>. Doing this generates a <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
<h1><a class="anchor" id="context_current"></a>
Current context</h1>
<p>Before you can make OpenGL or OpenGL ES calls, you need to have a current context of the correct type. A context can only be current for a single thread at a time, and a thread can only have a single context current at a time.</p>
<p>When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>
<p>The context of a window is made current with <a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>.</p>
<div class="fragment"><div class="line"><a class="code hl_function" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>(window);</div>
<div class="ttc" id="agroup__context_html_ga1c04dc242268f827290fe40aa1c91157"><div class="ttname"><a href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></div><div class="ttdeci">void glfwMakeContextCurrent(GLFWwindow *window)</div><div class="ttdoc">Makes the context of the specified window current for the calling thread.</div></div>
</div><!-- fragment --><p>The window of the current context is returned by <a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a>.</p>
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window = <a class="code hl_function" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a>();</div>
<div class="ttc" id="agroup__context_html_gad94e80185397a6cf5fe2ab30567af71c"><div class="ttname"><a href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a></div><div class="ttdeci">GLFWwindow * glfwGetCurrentContext(void)</div><div class="ttdoc">Returns the window whose context is current on the calling thread.</div></div>
</div><!-- fragment --><p>The following GLFW functions require a context to be current. Calling any these functions without a current context will generate a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<ul>
<li><a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a></li>
<li><a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></li>
<li><a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></li>
</ul>
<h1><a class="anchor" id="context_swap"></a>
Buffer swapping</h1>
<p>See <a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> in the window guide.</p>
<h1><a class="anchor" id="context_glext"></a>
OpenGL and OpenGL ES extensions</h1>
<p>One of the benefits of OpenGL and OpenGL ES is their extensibility. Hardware vendors may include extensions in their implementations that extend the API before that functionality is included in a new version of the OpenGL or OpenGL ES specification, and some extensions are never included and remain as extensions until they become obsolete.</p>
<p>An extension is defined by:</p>
<ul>
<li>An extension name (e.g. <code>GL_ARB_gl_spirv</code>)</li>
<li>New OpenGL tokens (e.g. <code>GL_SPIR_V_BINARY_ARB</code>)</li>
<li>New OpenGL functions (e.g. <code>glSpecializeShaderARB</code>)</li>
</ul>
<p>Note the <code>ARB</code> affix, which stands for Architecture Review Board and is used for official extensions. The extension above was created by the ARB, but there are many different affixes, like <code>NV</code> for Nvidia and <code>AMD</code> for, well, AMD. Any group may also use the generic <code>EXT</code> affix. Lists of extensions, together with their specifications, can be found at the <a href="https://www.opengl.org/registry/">OpenGL Registry</a> and <a href="https://www.khronos.org/registry/gles/">OpenGL ES Registry</a>.</p>
<h2><a class="anchor" id="context_glext_auto"></a>
Loading extension with a loader library</h2>
<p>An extension loader library is the easiest and best way to access both OpenGL and OpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs. They will take care of all the details of declaring and loading everything you need. One such library is <a href="https://github.com/Dav1dde/glad">glad</a> and there are several others.</p>
<p>The following example will use glad but all extension loader libraries work similarly.</p>
<p>First you need to generate the source files using the glad Python script. This example generates a loader for any version of OpenGL, which is the default for both GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific API versions and extension sets can be generated. The generated files are written to the <code>output</code> directory.</p>
<div class="fragment"><div class="line">python main.py --generator c --no-loader --out-path output</div>
</div><!-- fragment --><p>The <code>--no-loader</code> option is added because GLFW already provides a function for loading OpenGL and OpenGL ES function pointers, one that automatically uses the selected context creation API, and glad can call this instead of having to implement its own. There are several other command-line options as well. See the glad documentation for details.</p>
<p>Add the generated <code>output/src/glad.c</code>, <code>output/include/glad/glad.h</code> and <code>output/include/KHR/khrplatform.h</code> files to your build. Then you need to include the glad header file, which will replace the OpenGL header of your development environment. By including the glad header before the GLFW header, it suppresses the development environment's OpenGL or OpenGL ES header.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;glad/glad.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
<div class="ttc" id="aglfw3_8h_html"><div class="ttname"><a href="glfw3_8h.html">glfw3.h</a></div><div class="ttdoc">The header of the GLFW 3 API.</div></div>
</div><!-- fragment --><p>Finally, you need to initialize glad once you have a suitable current context.</p>
<div class="fragment"><div class="line">window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">&quot;My Window&quot;</span>, NULL, NULL);</div>
<div class="line"><span class="keywordflow">if</span> (!window)</div>
<div class="line">{</div>
<div class="line"> ...</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code hl_function" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>(window);</div>
<div class="line"> </div>
<div class="line">gladLoadGLLoader((GLADloadproc) <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>);</div>
<div class="ttc" id="agroup__context_html_ga35f1837e6f666781842483937612f163"><div class="ttname"><a href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></div><div class="ttdeci">GLFWglproc glfwGetProcAddress(const char *procname)</div><div class="ttdoc">Returns the address of the specified function for the current context.</div></div>
</div><!-- fragment --><p>Once glad has been loaded, you have access to all OpenGL core and extension functions supported by both the context you created and the glad loader you generated. After that, you are ready to start rendering.</p>
<p>You can specify a minimum required OpenGL or OpenGL ES version with <a class="el" href="window_guide.html#window_hints_ctx">context hints</a>. If your needs are more complex, you can check the actual OpenGL or OpenGL ES version with <a class="el" href="window_guide.html#window_attribs_ctx">context attributes</a>, or you can check whether a specific version is supported by the current context with the <code>GLAD_GL_VERSION_x_x</code> booleans.</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (GLAD_GL_VERSION_3_2)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Call OpenGL 3.2+ specific code</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>To check whether a specific extension is supported, use the <code>GLAD_GL_xxx</code> booleans.</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (GLAD_GL_ARB_gl_spirv)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Use GL_ARB_gl_spirv</span></div>
<div class="line">}</div>
</div><!-- fragment --><h2><a class="anchor" id="context_glext_manual"></a>
Loading extensions manually</h2>
<p><b>Do not use this technique</b> unless it is absolutely necessary. An <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a> will save you a ton of tedious, repetitive, error prone work.</p>
<p>To use a certain extension, you must first check whether the context supports that extension and then, if it introduces new functions, retrieve the pointers to those functions. GLFW provides <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> and <a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a> for manual loading of extensions and new API functions.</p>
<p>This section will demonstrate manual loading of OpenGL extensions. The loading of OpenGL ES extensions is identical except for the name of the extension header.</p>
<h3><a class="anchor" id="context_glext_header"></a>
The glext.h header</h3>
<p>The <code>glext.h</code> extension header is a continually updated file that defines the interfaces for all OpenGL extensions. The latest version of this can always be found at the <a href="https://www.opengl.org/registry/">OpenGL Registry</a>. There are also extension headers for the various versions of OpenGL ES at the <a href="https://www.khronos.org/registry/gles/">OpenGL ES Registry</a>. It it strongly recommended that you use your own copy of the extension header, as the one included in your development environment may be several years out of date and may not include the extensions you wish to use.</p>
<p>The header defines function pointer types for all functions of all extensions it supports. These have names like <code>PFNGLSPECIALIZESHADERARBPROC</code> (for <code>glSpecializeShaderARB</code>), i.e. the name is made uppercase and <code>PFN</code> (pointer to function) and <code>PROC</code> (procedure) are added to the ends.</p>
<p>To include the extension header, define <a class="el" href="build_guide.html#GLFW_INCLUDE_GLEXT">GLFW_INCLUDE_GLEXT</a> before including the GLFW header.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_GLEXT</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
</div><!-- fragment --><h3><a class="anchor" id="context_glext_string"></a>
Checking for extensions</h3>
<p>A given machine may not actually support the extension (it may have older drivers or a graphics card that lacks the necessary hardware features), so it is necessary to check at run-time whether the context supports the extension. This is done with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>.</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>(<span class="stringliteral">&quot;GL_ARB_gl_spirv&quot;</span>))</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// The extension is supported by the current context</span></div>
<div class="line">}</div>
<div class="ttc" id="agroup__context_html_ga87425065c011cef1ebd6aac75e059dfa"><div class="ttname"><a href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></div><div class="ttdeci">int glfwExtensionSupported(const char *extension)</div><div class="ttdoc">Returns whether the specified extension is available.</div></div>
</div><!-- fragment --><p>The argument is a null terminated ASCII string with the extension name. If the extension is supported, <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> returns <code>GLFW_TRUE</code>, otherwise it returns <code>GLFW_FALSE</code>.</p>
<h3><a class="anchor" id="context_glext_proc"></a>
Fetching function pointers</h3>
<p>Many extensions, though not all, require the use of new OpenGL functions. These functions often do not have entry points in the client API libraries of your operating system, making it necessary to fetch them at run time. You can retrieve pointers to these functions with <a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>.</p>
<div class="fragment"><div class="line">PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB = <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>(<span class="stringliteral">&quot;glSpecializeShaderARB&quot;</span>);</div>
</div><!-- fragment --><p>In general, you should avoid giving the function pointer variables the (exact) same name as the function, as this may confuse your linker. Instead, you can use a different prefix, like above, or some other naming scheme.</p>
<p>Now that all the pieces have been introduced, here is what they might look like when used together.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_GLEXT</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#define glSpecializeShaderARB pfnSpecializeShaderARB</span></div>
<div class="line">PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Flag indicating whether the extension is supported</span></div>
<div class="line"><span class="keywordtype">int</span> has_ARB_gl_spirv = 0;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> load_extensions(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">if</span> (<a class="code hl_function" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>(<span class="stringliteral">&quot;GL_ARB_gl_spirv&quot;</span>))</div>
<div class="line"> {</div>
<div class="line"> pfnSpecializeShaderARB = (PFNGLSPECIALIZESHADERARBPROC)</div>
<div class="line"> <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>(<span class="stringliteral">&quot;glSpecializeShaderARB&quot;</span>);</div>
<div class="line"> has_ARB_gl_spirv = 1;</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> some_function(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">if</span> (has_ARB_gl_spirv)</div>
<div class="line"> {</div>
<div class="line"> <span class="comment">// Now the extension function can be called as usual</span></div>
<div class="line"> glSpecializeShaderARB(...);</div>
<div class="line"> }</div>
<div class="line">}</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- PageDoc -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Deprecated List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Deprecated List</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><dl class="reflist">
<dt>Global <a class="el" href="group__input.html#gac3cf64f90b6219c05ac7b7822d5a4b8f">GLFWcharmodsfun</a> )(GLFWwindow *window, unsigned int codepoint, int mods)</dt>
<dd><a class="anchor" id="_deprecated000001"></a>Scheduled for removal in version 4.0. </dd>
<dt>Global <a class="el" href="group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c">glfwSetCharModsCallback</a> (GLFWwindow *window, GLFWcharmodsfun callback)</dt>
<dd><a class="anchor" id="_deprecated000002"></a>Scheduled for removal in version 4.0.</dd>
</dl>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: glfw-3.4 Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">glfw-3.4 Directory Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="iconfclosed"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_a788ef6c2b1e5b367804e0b6ccfd6f11.html">docs</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="iconfclosed"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html">include</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: GLFW Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li><li class="navelem"><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html">include</a></li><li class="navelem"><a class="el" href="dir_7f92719a7fe62e5b064f87d7a3c220b1.html">GLFW</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">GLFW Directory Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
Files</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="glfw3_8h_source.html"><span class="icondoc"></span></a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="glfw3_8h.html">glfw3.h</a></td></tr>
<tr class="memdesc:glfw3_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">The header of the GLFW 3 API. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><a href="glfw3native_8h_source.html"><span class="icondoc"></span></a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="glfw3native_8h.html">glfw3native.h</a></td></tr>
<tr class="memdesc:glfw3native_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">The header of the native access functions. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: docs Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li><li class="navelem"><a class="el" href="dir_a788ef6c2b1e5b367804e0b6ccfd6f11.html">docs</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">docs Directory Reference</div></div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: include Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li><li class="navelem"><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">include Directory Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="iconfclosed"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_7f92719a7fe62e5b064f87d7a3c220b1.html">GLFW</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2">
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
</g>
<g style="fill:#D8DFEE;stroke-width:0">
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5">
<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0">
<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,192 @@
/*
@licstart The following is the entire license notice for the JavaScript code in this file.
The MIT License (MIT)
Copyright (C) 1997-2020 by Dimitri van Heesch
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.
@licend The above is the entire license notice for the JavaScript code in this file
*/
function toggleVisibility(linkObj)
{
var base = $(linkObj).attr('id');
var summary = $('#'+base+'-summary');
var content = $('#'+base+'-content');
var trigger = $('#'+base+'-trigger');
var src=$(trigger).attr('src');
if (content.is(':visible')===true) {
content.hide();
summary.show();
$(linkObj).addClass('closed').removeClass('opened');
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
content.show();
summary.hide();
$(linkObj).removeClass('closed').addClass('opened');
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
}
return false;
}
function updateStripes()
{
$('table.directory tr').
removeClass('even').filter(':visible:even').addClass('even');
$('table.directory tr').
removeClass('odd').filter(':visible:odd').addClass('odd');
}
function toggleLevel(level)
{
$('table.directory tr').each(function() {
var l = this.id.split('_').length-1;
var i = $('#img'+this.id.substring(3));
var a = $('#arr'+this.id.substring(3));
if (l<level+1) {
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
a.html('&#9660;');
$(this).show();
} else if (l==level+1) {
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
a.html('&#9658;');
$(this).show();
} else {
$(this).hide();
}
});
updateStripes();
}
function toggleFolder(id)
{
// the clicked row
var currentRow = $('#row_'+id);
// all rows after the clicked row
var rows = currentRow.nextAll("tr");
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
// only match elements AFTER this one (can't hide elements before)
var childRows = rows.filter(function() { return this.id.match(re); });
// first row is visible we are HIDING
if (childRows.filter(':first').is(':visible')===true) {
// replace down arrow by right arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
currentRowSpans.filter(".arrow").html('&#9658;');
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
} else { // we are SHOWING
// replace right arrow by down arrow for current row
var currentRowSpans = currentRow.find("span");
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
currentRowSpans.filter(".arrow").html('&#9660;');
// replace down arrows by right arrows for child rows
var childRowsSpans = childRows.find("span");
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
childRowsSpans.filter(".arrow").html('&#9658;');
childRows.show(); //show all children
}
updateStripes();
}
function toggleInherit(id)
{
var rows = $('tr.inherit.'+id);
var img = $('tr.inherit_header.'+id+' img');
var src = $(img).attr('src');
if (rows.filter(':first').is(':visible')===true) {
rows.css('display','none');
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
} else {
rows.css('display','table-row'); // using show() causes jump in firefox
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
}
}
var opened=true;
// in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes
var plusImg = [ "url('plus.svg')", "url('../../plus.svg')" ];
var minusImg = [ "url('minus.svg')", "url('../../minus.svg')" ];
// toggle all folding blocks
function codefold_toggle_all(relPath) {
if (opened) {
$('#fold_all').css('background-image',plusImg[relPath]);
$('div[id^=foldopen]').hide();
$('div[id^=foldclosed]').show();
} else {
$('#fold_all').css('background-image',minusImg[relPath]);
$('div[id^=foldopen]').show();
$('div[id^=foldclosed]').hide();
}
opened=!opened;
}
// toggle single folding block
function codefold_toggle(id) {
$('#foldopen'+id).toggle();
$('#foldclosed'+id).toggle();
}
function init_codefold(relPath) {
$('span[class=lineno]').css(
{'padding-right':'4px',
'margin-right':'2px',
'display':'inline-block',
'width':'54px',
'background':'linear-gradient(#808080,#808080) no-repeat 46px/2px 100%'
});
// add global toggle to first line
$('span[class=lineno]:first').append('<span class="fold" id="fold_all" '+
'onclick="javascript:codefold_toggle_all('+relPath+');" '+
'style="background-image:'+minusImg[relPath]+';"></span>');
// add vertical lines to other rows
$('span[class=lineno]').not(':eq(0)').append('<span class="fold"></span>');
// add toggle controls to lines with fold divs
$('div[class=foldopen]').each(function() {
// extract specific id to use
var id = $(this).attr('id').replace('foldopen','');
// extract start and end foldable fragment attributes
var start = $(this).attr('data-start');
var end = $(this).attr('data-end');
// replace normal fold span with controls for the first line of a foldable fragment
$(this).find('span[class=fold]:first').replaceWith('<span class="fold" '+
'onclick="javascript:codefold_toggle(\''+id+'\');" '+
'style="background-image:'+minusImg[relPath]+';"></span>');
// append div for folded (closed) representation
$(this).after('<div id="foldclosed'+id+'" class="foldclosed" style="display:none;"></div>');
// extract the first line from the "open" section to represent closed content
var line = $(this).children().first().clone();
// remove any glow that might still be active on the original line
$(line).removeClass('glow');
if (start) {
// if line already ends with a start marker (e.g. trailing {), remove it
$(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),''));
}
// replace minus with plus symbol
$(line).find('span[class=fold]').css('background-image',plusImg[relPath]);
// append ellipsis
$(line).append(' '+start+'<a href="javascript:codefold_toggle(\''+id+'\')">&#8230;</a>'+end);
// insert constructed line into closed div
$('#foldclosed'+id).html(line);
});
}
/* @license-end */

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Files</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Files</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span><span onclick="javascript:toggleLevel(4);">4</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')">&#160;</span><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html" target="_self">glfw-3.4</a></td><td class="desc"></td></tr>
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="iconfclosed"></span><a class="el" href="dir_a788ef6c2b1e5b367804e0b6ccfd6f11.html" target="_self">docs</a></td><td class="desc"></td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">&#9660;</span><span id="img_0_1_" class="iconfopen" onclick="toggleFolder('0_1_')">&#160;</span><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html" target="_self">include</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_1_0_" class="arrow" onclick="toggleFolder('0_1_0_')">&#9660;</span><span id="img_0_1_0_" class="iconfopen" onclick="toggleFolder('0_1_0_')">&#160;</span><a class="el" href="dir_7f92719a7fe62e5b064f87d7a3c220b1.html" target="_self">GLFW</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="glfw3_8h_source.html"><span class="icondoc"></span></a><a class="el" href="glfw3_8h.html" target="_self">glfw3.h</a></td><td class="desc">The header of the GLFW 3 API </td></tr>
<tr id="row_0_1_0_1_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><a href="glfw3native_8h_source.html"><span class="icondoc"></span></a><a class="el" href="glfw3native_8h.html" target="_self">glfw3native.h</a></td><td class="desc">The header of the native access functions </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2;">
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
</g>
<g style="fill:#D8DFEE;stroke-width:0;">
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5;">
<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0;">
<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#4665A2;">
<path
d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"
id="path2" />
</g>
<g style="fill:#D8DFEE;stroke-width:0;">
<path
d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z"
id="path199" /><path
d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z"
id="path201" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
<g style="fill:#C4CFE5;">
<path d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"/>
</g>
<g style="fill:#4665A2;stroke-width:0;">
<path d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z" />
<path d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,170 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: glfw3native.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li><li class="navelem"><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html">include</a></li><li class="navelem"><a class="el" href="dir_7f92719a7fe62e5b064f87d7a3c220b1.html">GLFW</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">glfw3native.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<div class="textblock"><p>This is the header file of the native access functions. See <a class="el" href="group__native.html">Native access</a> for more information. </p>
</div>
<p><a href="glfw3native_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad4d3e9242536c0ba6be88a98f4c73a41" id="r_gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the adapter device name of the specified monitor. <br /></td></tr>
<tr class="separator:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac845f7dbe4c1d7fdd682a3c6fdae6766" id="r_gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display device name of the specified monitor. <br /></td></tr>
<tr class="separator:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe5079aa79038b0079fc09d5f0a8e667" id="r_gafe5079aa79038b0079fc09d5f0a8e667"><td class="memItemLeft" align="right" valign="top">HWND&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gafe5079aa79038b0079fc09d5f0a8e667"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>HWND</code> of the specified window. <br /></td></tr>
<tr class="separator:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadc4010d91d9cc1134d040eeb1202a143" id="r_gadc4010d91d9cc1134d040eeb1202a143"><td class="memItemLeft" align="right" valign="top">HGLRC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gadc4010d91d9cc1134d040eeb1202a143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>HGLRC</code> of the specified window. <br /></td></tr>
<tr class="separator:gadc4010d91d9cc1134d040eeb1202a143"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf22f429aec4b1aab316142d66d9be3e6" id="r_gaf22f429aec4b1aab316142d66d9be3e6"><td class="memItemLeft" align="right" valign="top">CGDirectDisplayID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gaf22f429aec4b1aab316142d66d9be3e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>CGDirectDisplayID</code> of the specified monitor. <br /></td></tr>
<tr class="separator:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3ed9d495d0c2bb9652de5a50c648715" id="r_gac3ed9d495d0c2bb9652de5a50c648715"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gac3ed9d495d0c2bb9652de5a50c648715"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSWindow</code> of the specified window. <br /></td></tr>
<tr class="separator:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7274fb6595894e880fc95dc63156e9b1" id="r_ga7274fb6595894e880fc95dc63156e9b1"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga7274fb6595894e880fc95dc63156e9b1">glfwGetCocoaView</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga7274fb6595894e880fc95dc63156e9b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSView</code> of the specified window. <br /></td></tr>
<tr class="separator:ga7274fb6595894e880fc95dc63156e9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga559e002e3cd63c979881770cd4dc63bc" id="r_ga559e002e3cd63c979881770cd4dc63bc"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga559e002e3cd63c979881770cd4dc63bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSOpenGLContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga559e002e3cd63c979881770cd4dc63bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e7822385cc8a1cc3b18f60352830189" id="r_ga6e7822385cc8a1cc3b18f60352830189"><td class="memItemLeft" align="right" valign="top">Display *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a> (void)</td></tr>
<tr class="memdesc:ga6e7822385cc8a1cc3b18f60352830189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>Display</code> used by GLFW. <br /></td></tr>
<tr class="separator:ga6e7822385cc8a1cc3b18f60352830189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga088fbfa80f50569402b41be71ad66e40" id="r_ga088fbfa80f50569402b41be71ad66e40"><td class="memItemLeft" align="right" valign="top">RRCrtc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga088fbfa80f50569402b41be71ad66e40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>RRCrtc</code> of the specified monitor. <br /></td></tr>
<tr class="separator:ga088fbfa80f50569402b41be71ad66e40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c" id="r_gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memItemLeft" align="right" valign="top">RROutput&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>RROutput</code> of the specified monitor. <br /></td></tr>
<tr class="separator:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90ca676322740842db446999a1b1f21d" id="r_ga90ca676322740842db446999a1b1f21d"><td class="memItemLeft" align="right" valign="top">Window&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga90ca676322740842db446999a1b1f21d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>Window</code> of the specified window. <br /></td></tr>
<tr class="separator:ga90ca676322740842db446999a1b1f21d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55f879ab02d93367f966186b6f0133f7" id="r_ga55f879ab02d93367f966186b6f0133f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a> (const char *string)</td></tr>
<tr class="memdesc:ga55f879ab02d93367f966186b6f0133f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current primary selection to the specified string. <br /></td></tr>
<tr class="separator:ga55f879ab02d93367f966186b6f0133f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae084ef64dc0db140b455b1427256d3f7" id="r_gae084ef64dc0db140b455b1427256d3f7"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> (void)</td></tr>
<tr class="memdesc:gae084ef64dc0db140b455b1427256d3f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the contents of the current primary selection as a string. <br /></td></tr>
<tr class="separator:gae084ef64dc0db140b455b1427256d3f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62d884114b0abfcdc2930e89f20867e2" id="r_ga62d884114b0abfcdc2930e89f20867e2"><td class="memItemLeft" align="right" valign="top">GLXContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga62d884114b0abfcdc2930e89f20867e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>GLXContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga62d884114b0abfcdc2930e89f20867e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ed27b8766e859a21381e8f8ce18d049" id="r_ga1ed27b8766e859a21381e8f8ce18d049"><td class="memItemLeft" align="right" valign="top">GLXWindow&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga1ed27b8766e859a21381e8f8ce18d049"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>GLXWindow</code> of the specified window. <br /></td></tr>
<tr class="separator:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacbe11f93ce20621de82989bbba94e62a" id="r_gacbe11f93ce20621de82989bbba94e62a"><td class="memItemLeft" align="right" valign="top">struct wl_display *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a> (void)</td></tr>
<tr class="memdesc:gacbe11f93ce20621de82989bbba94e62a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>struct wl_display*</code> used by GLFW. <br /></td></tr>
<tr class="separator:gacbe11f93ce20621de82989bbba94e62a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f16066bd4c59e2f99418adfcb43dd16" id="r_ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memItemLeft" align="right" valign="top">struct wl_output *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>struct wl_output*</code> of the specified monitor. <br /></td></tr>
<tr class="separator:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c597f2841229d9626f0811cca41ceb3" id="r_ga5c597f2841229d9626f0811cca41ceb3"><td class="memItemLeft" align="right" valign="top">struct wl_surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga5c597f2841229d9626f0811cca41ceb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the main <code>struct wl_surface*</code> of the specified window. <br /></td></tr>
<tr class="separator:ga5c597f2841229d9626f0811cca41ceb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cd8d973f47aacb5532d368147cc3138" id="r_ga1cd8d973f47aacb5532d368147cc3138"><td class="memItemLeft" align="right" valign="top">EGLDisplay&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a> (void)</td></tr>
<tr class="memdesc:ga1cd8d973f47aacb5532d368147cc3138"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLDisplay</code> used by GLFW. <br /></td></tr>
<tr class="separator:ga1cd8d973f47aacb5532d368147cc3138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga671c5072becd085f4ab5771a9c8efcf1" id="r_ga671c5072becd085f4ab5771a9c8efcf1"><td class="memItemLeft" align="right" valign="top">EGLContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga671c5072becd085f4ab5771a9c8efcf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2199b36117a6a695fec8441d8052eee6" id="r_ga2199b36117a6a695fec8441d8052eee6"><td class="memItemLeft" align="right" valign="top">EGLSurface&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga2199b36117a6a695fec8441d8052eee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLSurface</code> of the specified window. <br /></td></tr>
<tr class="separator:ga2199b36117a6a695fec8441d8052eee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b36e3e3dcf308b776427b6bd73cc132" id="r_ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>
<tr class="memdesc:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the color buffer associated with the specified window. <br /></td></tr>
<tr class="separator:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6b64039ffc88a7a2f57f0956c0c75d53" id="r_ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>
<tr class="memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the depth buffer associated with the specified window. <br /></td></tr>
<tr class="separator:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e47700080094eb569cb053afaa88773" id="r_ga9e47700080094eb569cb053afaa88773"><td class="memItemLeft" align="right" valign="top">OSMesaContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga9e47700080094eb569cb053afaa88773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>OSMesaContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga9e47700080094eb569cb053afaa88773"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,306 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: glfw3native.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_13577e2d8b9423099662de029791bd7d.html">glfw-3.4</a></li><li class="navelem"><a class="el" href="dir_b11153cd0f4fd04a7564cc166f482635.html">include</a></li><li class="navelem"><a class="el" href="dir_7f92719a7fe62e5b064f87d7a3c220b1.html">GLFW</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">glfw3native.h</div></div>
</div><!--header-->
<div class="contents">
<a href="glfw3native_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*************************************************************************</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * GLFW 3.4 - www.glfw.org</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * A library for OpenGL, window and input</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> *------------------------------------------------------------------------</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * Copyright (c) 2002-2006 Marcus Geelnard</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * Copyright (c) 2006-2018 Camilla Löwy &lt;elmindreda@glfw.org&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> *</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * This software is provided &#39;as-is&#39;, without any express or implied</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * warranty. In no event will the authors be held liable for any damages</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> * arising from the use of this software.</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> *</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Permission is granted to anyone to use this software for any purpose,</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * including commercial applications, and to alter it and redistribute it</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * freely, subject to the following restrictions:</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> *</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * 1. The origin of this software must not be misrepresented; you must not</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * claim that you wrote the original software. If you use this software</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> * in a product, an acknowledgment in the product documentation would</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment"> * be appreciated but is not required.</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> *</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment"> * 2. Altered source versions must be plainly marked as such, and must not</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment"> * be misrepresented as being the original software.</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment"> *</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment"> * 3. This notice may not be removed or altered from any source</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment"> * distribution.</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment"> *</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment"> *************************************************************************/</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#ifndef _glfw3_native_h_</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define _glfw3_native_h_</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/*************************************************************************</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment"> * Doxygen documentation</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment"> *************************************************************************/</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment">/*************************************************************************</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> * System headers and types</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> *************************************************************************/</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="preprocessor">#if !defined(GLFW_NATIVE_INCLUDE_NONE)</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">/* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> * example to allow applications to correctly declare a GL_KHR_debug callback)</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> * but windows.h assumes no one will define APIENTRY before it does</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> */</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="preprocessor"> #if defined(GLFW_APIENTRY_DEFINED)</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="preprocessor"> #undef APIENTRY</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor"> #undef GLFW_APIENTRY_DEFINED</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="preprocessor"> #include &lt;windows.h&gt;</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="preprocessor"> #if defined(__OBJC__)</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor"> #import &lt;Cocoa/Cocoa.h&gt;</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="preprocessor"> #else</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor"> #include &lt;ApplicationServices/ApplicationServices.h&gt;</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="preprocessor"> #include &lt;objc/objc.h&gt;</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="preprocessor"> #include &lt;X11/Xlib.h&gt;</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="preprocessor"> #include &lt;X11/extensions/Xrandr.h&gt;</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="preprocessor"> #include &lt;wayland-client.h&gt;</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="comment">/* WGL is declared by windows.h */</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="comment">/* NSGL is declared by Cocoa.h */</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="comment"> * default it also acts as an OpenGL header</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment"> * However, glx.h will include gl.h, which will define it unconditionally</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment"> */</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="preprocessor"> #if defined(GLFW_GLAPIENTRY_DEFINED)</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="preprocessor"> #undef GLAPIENTRY</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="preprocessor"> #undef GLFW_GLAPIENTRY_DEFINED</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="preprocessor"> #include &lt;GL/glx.h&gt;</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="preprocessor"> #include &lt;EGL/egl.h&gt;</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="comment"> * default it also acts as an OpenGL header</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="comment"> * However, osmesa.h will include gl.h, which will define it unconditionally</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="comment"> */</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="preprocessor"> #if defined(GLFW_GLAPIENTRY_DEFINED)</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="preprocessor"> #undef GLAPIENTRY</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span><span class="preprocessor"> #undef GLFW_GLAPIENTRY_DEFINED</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="preprocessor"> #include &lt;GL/osmesa.h&gt;</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="preprocessor"> #endif</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor">#endif </span><span class="comment">/*GLFW_NATIVE_INCLUDE_NONE*/</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="comment">/*************************************************************************</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="comment"> * Functions</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="comment"> *************************************************************************/</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WIN32)</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41"> 182</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766"> 200</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667"> 225</a></span>GLFWAPI HWND <a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> </div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"><a class="line" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143"> 252</a></span>GLFWAPI HGLRC <a class="code hl_function" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_COCOA)</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"><a class="line" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6"> 271</a></span>GLFWAPI CGDirectDisplayID <a class="code hl_function" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> </div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"><a class="line" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715"> 288</a></span>GLFWAPI <span class="keywordtype">id</span> <a class="code hl_function" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> </div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"><a class="line" href="group__native.html#ga7274fb6595894e880fc95dc63156e9b1"> 305</a></span>GLFWAPI <span class="keywordtype">id</span> <a class="code hl_function" href="group__native.html#ga7274fb6595894e880fc95dc63156e9b1">glfwGetCocoaView</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"><a class="line" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc"> 324</a></span>GLFWAPI <span class="keywordtype">id</span> <a class="code hl_function" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> </div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_X11)</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"><a class="line" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189"> 343</a></span>GLFWAPI Display* <a class="code hl_function" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> </div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"><a class="line" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40"> 360</a></span>GLFWAPI RRCrtc <a class="code hl_function" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> </div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c"> 377</a></span>GLFWAPI RROutput <a class="code hl_function" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> </div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"><a class="line" href="group__native.html#ga90ca676322740842db446999a1b1f21d"> 394</a></span>GLFWAPI Window <a class="code hl_function" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> </div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"><a class="line" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7"> 416</a></span>GLFWAPI <span class="keywordtype">void</span> <a class="code hl_function" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span>);</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> </div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"><a class="line" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7"> 444</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> </div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"><a class="line" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2"> 463</a></span>GLFWAPI GLXContext <a class="code hl_function" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> </div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"><a class="line" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049"> 480</a></span>GLFWAPI GLXWindow <a class="code hl_function" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> </div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"><a class="line" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a"> 499</a></span>GLFWAPI <span class="keyword">struct </span>wl_display* <a class="code hl_function" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"><a class="line" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16"> 516</a></span>GLFWAPI <span class="keyword">struct </span>wl_output* <a class="code hl_function" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> </div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"><a class="line" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3"> 533</a></span>GLFWAPI <span class="keyword">struct </span>wl_surface* <a class="code hl_function" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> </div>
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"><a class="line" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138"> 554</a></span>GLFWAPI EGLDisplay <a class="code hl_function" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> </div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"><a class="line" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1"> 571</a></span>GLFWAPI EGLContext <a class="code hl_function" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> </div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"><a class="line" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6"> 588</a></span>GLFWAPI EGLSurface <a class="code hl_function" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> </div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"><a class="line" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132"> 614</a></span>GLFWAPI <span class="keywordtype">int</span> <a class="code hl_function" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span>* width, <span class="keywordtype">int</span>* height, <span class="keywordtype">int</span>* format, <span class="keywordtype">void</span>** buffer);</div>
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> </div>
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno"><a class="line" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53"> 638</a></span>GLFWAPI <span class="keywordtype">int</span> <a class="code hl_function" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span>* width, <span class="keywordtype">int</span>* height, <span class="keywordtype">int</span>* bytesPerValue, <span class="keywordtype">void</span>** buffer);</div>
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno"> 639</span> </div>
<div class="line"><a id="l00655" name="l00655"></a><span class="lineno"><a class="line" href="group__native.html#ga9e47700080094eb569cb053afaa88773"> 655</a></span>GLFWAPI OSMesaContext <a class="code hl_function" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
<div class="line"><a id="l00656" name="l00656"></a><span class="lineno"> 656</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00657" name="l00657"></a><span class="lineno"> 657</span> </div>
<div class="line"><a id="l00658" name="l00658"></a><span class="lineno"> 658</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00659" name="l00659"></a><span class="lineno"> 659</span>}</div>
<div class="line"><a id="l00660" name="l00660"></a><span class="lineno"> 660</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00661" name="l00661"></a><span class="lineno"> 661</span> </div>
<div class="line"><a id="l00662" name="l00662"></a><span class="lineno"> 662</span><span class="preprocessor">#endif </span><span class="comment">/* _glfw3_native_h_ */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00663" name="l00663"></a><span class="lineno"> 663</span> </div>
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1391</div></div>
<div class="ttc" id="agroup__native_html_ga088fbfa80f50569402b41be71ad66e40"><div class="ttname"><a href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a></div><div class="ttdeci">RRCrtc glfwGetX11Adapter(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the RRCrtc of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_ga1cd8d973f47aacb5532d368147cc3138"><div class="ttname"><a href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a></div><div class="ttdeci">EGLDisplay glfwGetEGLDisplay(void)</div><div class="ttdoc">Returns the EGLDisplay used by GLFW.</div></div>
<div class="ttc" id="agroup__native_html_ga1ed27b8766e859a21381e8f8ce18d049"><div class="ttname"><a href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a></div><div class="ttdeci">GLXWindow glfwGetGLXWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the GLXWindow of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga2199b36117a6a695fec8441d8052eee6"><div class="ttname"><a href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a></div><div class="ttdeci">EGLSurface glfwGetEGLSurface(GLFWwindow *window)</div><div class="ttdoc">Returns the EGLSurface of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga3b36e3e3dcf308b776427b6bd73cc132"><div class="ttname"><a href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a></div><div class="ttdeci">int glfwGetOSMesaColorBuffer(GLFWwindow *window, int *width, int *height, int *format, void **buffer)</div><div class="ttdoc">Retrieves the color buffer associated with the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga4f16066bd4c59e2f99418adfcb43dd16"><div class="ttname"><a href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a></div><div class="ttdeci">struct wl_output * glfwGetWaylandMonitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the struct wl_output* of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_ga559e002e3cd63c979881770cd4dc63bc"><div class="ttname"><a href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a></div><div class="ttdeci">id glfwGetNSGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the NSOpenGLContext of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga55f879ab02d93367f966186b6f0133f7"><div class="ttname"><a href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a></div><div class="ttdeci">void glfwSetX11SelectionString(const char *string)</div><div class="ttdoc">Sets the current primary selection to the specified string.</div></div>
<div class="ttc" id="agroup__native_html_ga5c597f2841229d9626f0811cca41ceb3"><div class="ttname"><a href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a></div><div class="ttdeci">struct wl_surface * glfwGetWaylandWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the main struct wl_surface* of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga62d884114b0abfcdc2930e89f20867e2"><div class="ttname"><a href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a></div><div class="ttdeci">GLXContext glfwGetGLXContext(GLFWwindow *window)</div><div class="ttdoc">Returns the GLXContext of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga671c5072becd085f4ab5771a9c8efcf1"><div class="ttname"><a href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a></div><div class="ttdeci">EGLContext glfwGetEGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the EGLContext of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga6b64039ffc88a7a2f57f0956c0c75d53"><div class="ttname"><a href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a></div><div class="ttdeci">int glfwGetOSMesaDepthBuffer(GLFWwindow *window, int *width, int *height, int *bytesPerValue, void **buffer)</div><div class="ttdoc">Retrieves the depth buffer associated with the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga6e7822385cc8a1cc3b18f60352830189"><div class="ttname"><a href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a></div><div class="ttdeci">Display * glfwGetX11Display(void)</div><div class="ttdoc">Returns the Display used by GLFW.</div></div>
<div class="ttc" id="agroup__native_html_ga7274fb6595894e880fc95dc63156e9b1"><div class="ttname"><a href="group__native.html#ga7274fb6595894e880fc95dc63156e9b1">glfwGetCocoaView</a></div><div class="ttdeci">id glfwGetCocoaView(GLFWwindow *window)</div><div class="ttdoc">Returns the NSView of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga90ca676322740842db446999a1b1f21d"><div class="ttname"><a href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a></div><div class="ttdeci">Window glfwGetX11Window(GLFWwindow *window)</div><div class="ttdoc">Returns the Window of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_ga9e47700080094eb569cb053afaa88773"><div class="ttname"><a href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a></div><div class="ttdeci">OSMesaContext glfwGetOSMesaContext(GLFWwindow *window)</div><div class="ttdoc">Returns the OSMesaContext of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_gab2f8cc043905e9fa9b12bfdbbcfe874c"><div class="ttname"><a href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a></div><div class="ttdeci">RROutput glfwGetX11Monitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the RROutput of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_gac3ed9d495d0c2bb9652de5a50c648715"><div class="ttname"><a href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a></div><div class="ttdeci">id glfwGetCocoaWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the NSWindow of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_gac845f7dbe4c1d7fdd682a3c6fdae6766"><div class="ttname"><a href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a></div><div class="ttdeci">const char * glfwGetWin32Monitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the display device name of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_gacbe11f93ce20621de82989bbba94e62a"><div class="ttname"><a href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a></div><div class="ttdeci">struct wl_display * glfwGetWaylandDisplay(void)</div><div class="ttdoc">Returns the struct wl_display* used by GLFW.</div></div>
<div class="ttc" id="agroup__native_html_gad4d3e9242536c0ba6be88a98f4c73a41"><div class="ttname"><a href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a></div><div class="ttdeci">const char * glfwGetWin32Adapter(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the adapter device name of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_gadc4010d91d9cc1134d040eeb1202a143"><div class="ttname"><a href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a></div><div class="ttdeci">HGLRC glfwGetWGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the HGLRC of the specified window.</div></div>
<div class="ttc" id="agroup__native_html_gae084ef64dc0db140b455b1427256d3f7"><div class="ttname"><a href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a></div><div class="ttdeci">const char * glfwGetX11SelectionString(void)</div><div class="ttdoc">Returns the contents of the current primary selection as a string.</div></div>
<div class="ttc" id="agroup__native_html_gaf22f429aec4b1aab316142d66d9be3e6"><div class="ttname"><a href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a></div><div class="ttdeci">CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the CGDirectDisplayID of the specified monitor.</div></div>
<div class="ttc" id="agroup__native_html_gafe5079aa79038b0079fc09d5f0a8e667"><div class="ttname"><a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a></div><div class="ttdeci">HWND glfwGetWin32Window(GLFWwindow *window)</div><div class="ttdoc">Returns the HWND of the specified window.</div></div>
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1403</div></div>
</div><!-- fragment --></div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,282 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Mouse buttons</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Mouse buttons<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#input_mouse_button">mouse button input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga181a6e875251fd8671654eff00f9112e" id="r_ga181a6e875251fd8671654eff00f9112e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga181a6e875251fd8671654eff00f9112e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga604b39b92c88ce9bd332e97fc3f4156c" id="r_ga604b39b92c88ce9bd332e97fc3f4156c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga604b39b92c88ce9bd332e97fc3f4156c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0130d505563d0236a6f85545f19e1721" id="r_ga0130d505563d0236a6f85545f19e1721"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga0130d505563d0236a6f85545f19e1721"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53f4097bb01d5521c7d9513418c91ca9" id="r_ga53f4097bb01d5521c7d9513418c91ca9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga53f4097bb01d5521c7d9513418c91ca9">GLFW_MOUSE_BUTTON_4</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga53f4097bb01d5521c7d9513418c91ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf08c4ddecb051d3d9667db1d5e417c9c" id="r_gaf08c4ddecb051d3d9667db1d5e417c9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c">GLFW_MOUSE_BUTTON_5</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:gaf08c4ddecb051d3d9667db1d5e417c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8513e06aab8aa393b595f22c6d8257a" id="r_gae8513e06aab8aa393b595f22c6d8257a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a">GLFW_MOUSE_BUTTON_6</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:gae8513e06aab8aa393b595f22c6d8257a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8b02a1ab55dde45b3a3883d54ffd7dc7" id="r_ga8b02a1ab55dde45b3a3883d54ffd7dc7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7">GLFW_MOUSE_BUTTON_7</a>&#160;&#160;&#160;6</td></tr>
<tr class="separator:ga8b02a1ab55dde45b3a3883d54ffd7dc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35d5c4263e0dc0d0a4731ca6c562f32c" id="r_ga35d5c4263e0dc0d0a4731ca6c562f32c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a>&#160;&#160;&#160;7</td></tr>
<tr class="separator:ga35d5c4263e0dc0d0a4731ca6c562f32c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab1fd86a4518a9141ec7bcde2e15a2fdf" id="r_gab1fd86a4518a9141ec7bcde2e15a2fdf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf">GLFW_MOUSE_BUTTON_LAST</a>&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a></td></tr>
<tr class="separator:gab1fd86a4518a9141ec7bcde2e15a2fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf37100431dcd5082d48f95ee8bc8cd56" id="r_gaf37100431dcd5082d48f95ee8bc8cd56"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56">GLFW_MOUSE_BUTTON_LEFT</a>&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a></td></tr>
<tr class="separator:gaf37100431dcd5082d48f95ee8bc8cd56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e2f2cf3c4942df73cc094247d275e74" id="r_ga3e2f2cf3c4942df73cc094247d275e74"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74">GLFW_MOUSE_BUTTON_RIGHT</a>&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a></td></tr>
<tr class="separator:ga3e2f2cf3c4942df73cc094247d275e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34a4d2a701434f763fd93a2ff842b95a" id="r_ga34a4d2a701434f763fd93a2ff842b95a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a">GLFW_MOUSE_BUTTON_MIDDLE</a>&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a></td></tr>
<tr class="separator:ga34a4d2a701434f763fd93a2ff842b95a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga181a6e875251fd8671654eff00f9112e" name="ga181a6e875251fd8671654eff00f9112e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga181a6e875251fd8671654eff00f9112e">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_1</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_1&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga604b39b92c88ce9bd332e97fc3f4156c" name="ga604b39b92c88ce9bd332e97fc3f4156c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga604b39b92c88ce9bd332e97fc3f4156c">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_2</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_2&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga0130d505563d0236a6f85545f19e1721" name="ga0130d505563d0236a6f85545f19e1721"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0130d505563d0236a6f85545f19e1721">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_3</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_3&#160;&#160;&#160;2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga53f4097bb01d5521c7d9513418c91ca9" name="ga53f4097bb01d5521c7d9513418c91ca9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga53f4097bb01d5521c7d9513418c91ca9">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_4</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_4&#160;&#160;&#160;3</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaf08c4ddecb051d3d9667db1d5e417c9c" name="gaf08c4ddecb051d3d9667db1d5e417c9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf08c4ddecb051d3d9667db1d5e417c9c">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_5</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_5&#160;&#160;&#160;4</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gae8513e06aab8aa393b595f22c6d8257a" name="gae8513e06aab8aa393b595f22c6d8257a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8513e06aab8aa393b595f22c6d8257a">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_6</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_6&#160;&#160;&#160;5</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga8b02a1ab55dde45b3a3883d54ffd7dc7" name="ga8b02a1ab55dde45b3a3883d54ffd7dc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8b02a1ab55dde45b3a3883d54ffd7dc7">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_7</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_7&#160;&#160;&#160;6</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga35d5c4263e0dc0d0a4731ca6c562f32c" name="ga35d5c4263e0dc0d0a4731ca6c562f32c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga35d5c4263e0dc0d0a4731ca6c562f32c">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_8</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_8&#160;&#160;&#160;7</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gab1fd86a4518a9141ec7bcde2e15a2fdf" name="gab1fd86a4518a9141ec7bcde2e15a2fdf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab1fd86a4518a9141ec7bcde2e15a2fdf">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_LAST</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_LAST&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaf37100431dcd5082d48f95ee8bc8cd56" name="gaf37100431dcd5082d48f95ee8bc8cd56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf37100431dcd5082d48f95ee8bc8cd56">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_LEFT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_LEFT&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga3e2f2cf3c4942df73cc094247d275e74" name="ga3e2f2cf3c4942df73cc094247d275e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e2f2cf3c4942df73cc094247d275e74">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_RIGHT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_RIGHT&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga34a4d2a701434f763fd93a2ff842b95a" name="ga34a4d2a701434f763fd93a2ff842b95a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34a4d2a701434f763fd93a2ff842b95a">&#9670;&#160;</a></span>GLFW_MOUSE_BUTTON_MIDDLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOUSE_BUTTON_MIDDLE&#160;&#160;&#160;<a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,304 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Context reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">Context reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <a class="el" href="context_guide.html">Context guide</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga3d47c2d2fbe0be9c505d0e04e91a133c" id="r_ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a>) (void)</td></tr>
<tr class="memdesc:ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Client API function pointer type. <br /></td></tr>
<tr class="separator:ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga1c04dc242268f827290fe40aa1c91157" id="r_ga1c04dc242268f827290fe40aa1c91157"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga1c04dc242268f827290fe40aa1c91157"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes the context of the specified window current for the calling thread. <br /></td></tr>
<tr class="separator:ga1c04dc242268f827290fe40aa1c91157"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad94e80185397a6cf5fe2ab30567af71c" id="r_gad94e80185397a6cf5fe2ab30567af71c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a> (void)</td></tr>
<tr class="memdesc:gad94e80185397a6cf5fe2ab30567af71c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the window whose context is current on the calling thread. <br /></td></tr>
<tr class="separator:gad94e80185397a6cf5fe2ab30567af71c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d4e0cdf151b5e579bd67f13202994ed" id="r_ga6d4e0cdf151b5e579bd67f13202994ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> (int interval)</td></tr>
<tr class="memdesc:ga6d4e0cdf151b5e579bd67f13202994ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the swap interval for the current context. <br /></td></tr>
<tr class="separator:ga6d4e0cdf151b5e579bd67f13202994ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87425065c011cef1ebd6aac75e059dfa" id="r_ga87425065c011cef1ebd6aac75e059dfa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> (const char *extension)</td></tr>
<tr class="memdesc:ga87425065c011cef1ebd6aac75e059dfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the specified extension is available. <br /></td></tr>
<tr class="separator:ga87425065c011cef1ebd6aac75e059dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35f1837e6f666781842483937612f163" id="r_ga35f1837e6f666781842483937612f163"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a> (const char *procname)</td></tr>
<tr class="memdesc:ga35f1837e6f666781842483937612f163"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the specified function for the current context. <br /></td></tr>
<tr class="separator:ga35f1837e6f666781842483937612f163"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga3d47c2d2fbe0be9c505d0e04e91a133c" name="ga3d47c2d2fbe0be9c505d0e04e91a133c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d47c2d2fbe0be9c505d0e04e91a133c">&#9670;&#160;</a></span>GLFWglproc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* GLFWglproc) (void)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic function pointer used for returning client API function pointers without forcing a cast from a regular pointer.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
<dd>
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga1c04dc242268f827290fe40aa1c91157" name="ga1c04dc242268f827290fe40aa1c91157"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1c04dc242268f827290fe40aa1c91157">&#9670;&#160;</a></span>glfwMakeContextCurrent()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwMakeContextCurrent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. It can also detach the current context from the calling thread without making a new one current by passing in <code>NULL</code>.</p>
<p>A context must only be made current on a single thread at a time and each thread can have only a single current context at a time. Making a context current detaches any previously current context on the calling thread.</p>
<p>When moving a context between threads, you must detach it (make it non-current) on the old thread before making it current on the new one.</p>
<p>By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <a class="el" href="window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_hint">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> hint.</p>
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>
</table>
</dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>If the previously current context was created via a different context creation API than the one passed to this function, GLFW will still detach the previous one from its API before making the new one current.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
<dd>
<a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gad94e80185397a6cf5fe2ab30567af71c" name="gad94e80185397a6cf5fe2ab30567af71c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad94e80185397a6cf5fe2ab30567af71c">&#9670;&#160;</a></span>glfwGetCurrentContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * glfwGetCurrentContext </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>
<dl class="section return"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
<dd>
<a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga6d4e0cdf151b5e579bd67f13202994ed" name="ga6d4e0cdf151b5e579bd67f13202994ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6d4e0cdf151b5e579bd67f13202994ed">&#9670;&#160;</a></span>glfwSwapInterval()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSwapInterval </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>interval</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>
<p>A context that supports either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these extensions with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default for that API. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>
<dd>
Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> </dd>
<dd>
<a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
</div>
</div>
<a id="ga87425065c011cef1ebd6aac75e059dfa" name="ga87425065c011cef1ebd6aac75e059dfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87425065c011cef1ebd6aac75e059dfa">&#9670;&#160;</a></span>glfwExtensionSupported()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glfwExtensionSupported </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>extension</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns whether the specified <a class="el" href="context_guide.html#context_glext">API extension</a> is supported by the current OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.</p>
<p>This function does not apply to Vulkan. If you are using Vulkan, see <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a>, <code>vkEnumerateInstanceExtensionProperties</code> and <code>vkEnumerateDeviceExtensionProperties</code> instead.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">extension</td><td>The ASCII encoded name of the extension. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the extension is available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a>, <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
<dd>
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
</div>
</div>
<a id="ga35f1837e6f666781842483937612f163" name="ga35f1837e6f666781842483937612f163"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga35f1837e6f666781842483937612f163">&#9670;&#160;</a></span>glfwGetProcAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a> glfwGetProcAddress </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>procname</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the address of the specified OpenGL or OpenGL ES <a class="el" href="context_guide.html#context_glext">core or extension function</a>, if it is supported by the current context.</p>
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see <a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a>, <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> instead.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>The address of a given function is not guaranteed to be the same between contexts.</dd>
<dd>
This function may return a non-<code>NULL</code> address despite the associated version or extension not being available. Always check the context version or extension string first.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the context is destroyed or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
<dd>
<a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,384 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Error codes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Error codes<div class="ingroups"><a class="el" href="group__init.html">Initialization, version and error reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="intro_guide.html#error_handling">error handling</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gafa30deee5db4d69c4c93d116ed87dbf4" id="r_gafa30deee5db4d69c4c93d116ed87dbf4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:gafa30deee5db4d69c4c93d116ed87dbf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">No error has occurred. <br /></td></tr>
<tr class="separator:gafa30deee5db4d69c4c93d116ed87dbf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2374ee02c177f12e1fa76ff3ed15e14a" id="r_ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>&#160;&#160;&#160;0x00010001</td></tr>
<tr class="memdesc:ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="mdescLeft">&#160;</td><td class="mdescRight">GLFW has not been initialized. <br /></td></tr>
<tr class="separator:ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8290386e9528ccb9e42a3a4e16fc0d0" id="r_gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a>&#160;&#160;&#160;0x00010002</td></tr>
<tr class="memdesc:gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">No context is current for this thread. <br /></td></tr>
<tr class="separator:gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76f6bb9c4eea73db675f096b404593ce" id="r_ga76f6bb9c4eea73db675f096b404593ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>&#160;&#160;&#160;0x00010003</td></tr>
<tr class="memdesc:ga76f6bb9c4eea73db675f096b404593ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">One of the arguments to the function was an invalid enum value. <br /></td></tr>
<tr class="separator:ga76f6bb9c4eea73db675f096b404593ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf2ef9aa8202c2b82ac2d921e554c687" id="r_gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>&#160;&#160;&#160;0x00010004</td></tr>
<tr class="memdesc:gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="mdescLeft">&#160;</td><td class="mdescRight">One of the arguments to the function was an invalid value. <br /></td></tr>
<tr class="separator:gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9023953a2bcb98c2906afd071d21ee7f" id="r_ga9023953a2bcb98c2906afd071d21ee7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f">GLFW_OUT_OF_MEMORY</a>&#160;&#160;&#160;0x00010005</td></tr>
<tr class="memdesc:ga9023953a2bcb98c2906afd071d21ee7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">A memory allocation failed. <br /></td></tr>
<tr class="separator:ga9023953a2bcb98c2906afd071d21ee7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56882b290db23261cc6c053c40c2d08e" id="r_ga56882b290db23261cc6c053c40c2d08e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>&#160;&#160;&#160;0x00010006</td></tr>
<tr class="memdesc:ga56882b290db23261cc6c053c40c2d08e"><td class="mdescLeft">&#160;</td><td class="mdescRight">GLFW could not find support for the requested API on the system. <br /></td></tr>
<tr class="separator:ga56882b290db23261cc6c053c40c2d08e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad16c5565b4a69f9c2a9ac2c0dbc89462" id="r_gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a>&#160;&#160;&#160;0x00010007</td></tr>
<tr class="memdesc:gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="mdescLeft">&#160;</td><td class="mdescRight">The requested OpenGL or OpenGL ES version is not available. <br /></td></tr>
<tr class="separator:gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad44162d78100ea5e87cdd38426b8c7a1" id="r_gad44162d78100ea5e87cdd38426b8c7a1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>&#160;&#160;&#160;0x00010008</td></tr>
<tr class="memdesc:gad44162d78100ea5e87cdd38426b8c7a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">A platform-specific error occurred that does not match any of the more specific categories. <br /></td></tr>
<tr class="separator:gad44162d78100ea5e87cdd38426b8c7a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga196e125ef261d94184e2b55c05762f14" id="r_ga196e125ef261d94184e2b55c05762f14"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a>&#160;&#160;&#160;0x00010009</td></tr>
<tr class="memdesc:ga196e125ef261d94184e2b55c05762f14"><td class="mdescLeft">&#160;</td><td class="mdescRight">The requested format is not supported or available. <br /></td></tr>
<tr class="separator:ga196e125ef261d94184e2b55c05762f14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacff24d2757da752ae4c80bf452356487" id="r_gacff24d2757da752ae4c80bf452356487"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>&#160;&#160;&#160;0x0001000A</td></tr>
<tr class="memdesc:gacff24d2757da752ae4c80bf452356487"><td class="mdescLeft">&#160;</td><td class="mdescRight">The specified window does not have an OpenGL or OpenGL ES context. <br /></td></tr>
<tr class="separator:gacff24d2757da752ae4c80bf452356487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09d6943923a70ddef3a085f5baee786c" id="r_ga09d6943923a70ddef3a085f5baee786c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga09d6943923a70ddef3a085f5baee786c">GLFW_CURSOR_UNAVAILABLE</a>&#160;&#160;&#160;0x0001000B</td></tr>
<tr class="memdesc:ga09d6943923a70ddef3a085f5baee786c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The specified cursor shape is not available. <br /></td></tr>
<tr class="separator:ga09d6943923a70ddef3a085f5baee786c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga526fba20a01504a8086c763b6ca53ce5" id="r_ga526fba20a01504a8086c763b6ca53ce5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a>&#160;&#160;&#160;0x0001000C</td></tr>
<tr class="memdesc:ga526fba20a01504a8086c763b6ca53ce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">The requested feature is not provided by the platform. <br /></td></tr>
<tr class="separator:ga526fba20a01504a8086c763b6ca53ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5dda77e023e83151e8bd55a6758f946a" id="r_ga5dda77e023e83151e8bd55a6758f946a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga5dda77e023e83151e8bd55a6758f946a">GLFW_FEATURE_UNIMPLEMENTED</a>&#160;&#160;&#160;0x0001000D</td></tr>
<tr class="memdesc:ga5dda77e023e83151e8bd55a6758f946a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The requested feature is not implemented for the platform. <br /></td></tr>
<tr class="separator:ga5dda77e023e83151e8bd55a6758f946a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3608c6c29ab7a72f3bf019f4c3a2563d" id="r_ga3608c6c29ab7a72f3bf019f4c3a2563d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>&#160;&#160;&#160;0x0001000E</td></tr>
<tr class="memdesc:ga3608c6c29ab7a72f3bf019f4c3a2563d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Platform unavailable or no matching platform was found. <br /></td></tr>
<tr class="separator:ga3608c6c29ab7a72f3bf019f4c3a2563d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gafa30deee5db4d69c4c93d116ed87dbf4" name="gafa30deee5db4d69c4c93d116ed87dbf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa30deee5db4d69c4c93d116ed87dbf4">&#9670;&#160;</a></span>GLFW_NO_ERROR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_NO_ERROR&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
<p>No error has occurred.</p>
<dl class="section user"><dt>Analysis</dt><dd>Yay. </dd></dl>
</div>
</div>
<a id="ga2374ee02c177f12e1fa76ff3ed15e14a" name="ga2374ee02c177f12e1fa76ff3ed15e14a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2374ee02c177f12e1fa76ff3ed15e14a">&#9670;&#160;</a></span>GLFW_NOT_INITIALIZED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_NOT_INITIALIZED&#160;&#160;&#160;0x00010001</td>
</tr>
</table>
</div><div class="memdoc">
<p>This occurs if a GLFW function was called that must not be called unless the library is <a class="el" href="intro_guide.html#intro_init">initialized</a>.</p>
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Initialize GLFW before calling any function that requires initialization. </dd></dl>
</div>
</div>
<a id="gaa8290386e9528ccb9e42a3a4e16fc0d0" name="gaa8290386e9528ccb9e42a3a4e16fc0d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8290386e9528ccb9e42a3a4e16fc0d0">&#9670;&#160;</a></span>GLFW_NO_CURRENT_CONTEXT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_NO_CURRENT_CONTEXT&#160;&#160;&#160;0x00010002</td>
</tr>
</table>
</div><div class="memdoc">
<p>This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the calling thread. One such function is <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a>.</p>
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Ensure a context is current before calling functions that require a current context. </dd></dl>
</div>
</div>
<a id="ga76f6bb9c4eea73db675f096b404593ce" name="ga76f6bb9c4eea73db675f096b404593ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76f6bb9c4eea73db675f096b404593ce">&#9670;&#160;</a></span>GLFW_INVALID_ENUM</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_INVALID_ENUM&#160;&#160;&#160;0x00010003</td>
</tr>
</table>
</div><div class="memdoc">
<p>One of the arguments to the function was an invalid enum value, for example requesting <a class="el" href="window_guide.html#GLFW_RED_BITS">GLFW_RED_BITS</a> with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
</div>
</div>
<a id="gaaf2ef9aa8202c2b82ac2d921e554c687" name="gaaf2ef9aa8202c2b82ac2d921e554c687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaf2ef9aa8202c2b82ac2d921e554c687">&#9670;&#160;</a></span>GLFW_INVALID_VALUE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_INVALID_VALUE&#160;&#160;&#160;0x00010004</td>
</tr>
</table>
</div><div class="memdoc">
<p>One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.</p>
<p>Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a <a class="el" href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a> error.</p>
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
</div>
</div>
<a id="ga9023953a2bcb98c2906afd071d21ee7f" name="ga9023953a2bcb98c2906afd071d21ee7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9023953a2bcb98c2906afd071d21ee7f">&#9670;&#160;</a></span>GLFW_OUT_OF_MEMORY</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_OUT_OF_MEMORY&#160;&#160;&#160;0x00010005</td>
</tr>
</table>
</div><div class="memdoc">
<p>A memory allocation failed.</p>
<dl class="section user"><dt>Analysis</dt><dd>A bug in GLFW or the underlying operating system. Report the bug to our <a href="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
</div>
</div>
<a id="ga56882b290db23261cc6c053c40c2d08e" name="ga56882b290db23261cc6c053c40c2d08e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga56882b290db23261cc6c053c40c2d08e">&#9670;&#160;</a></span>GLFW_API_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_API_UNAVAILABLE&#160;&#160;&#160;0x00010006</td>
</tr>
</table>
</div><div class="memdoc">
<p>GLFW could not find support for the requested API on the system.</p>
<dl class="section user"><dt>Analysis</dt><dd>The installed graphics driver does not support the requested API, or does not support it via the chosen context creation API. Below are a few examples.</dd></dl>
<dl class="section user"><dt></dt><dd>Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan. </dd></dl>
</div>
</div>
<a id="gad16c5565b4a69f9c2a9ac2c0dbc89462" name="gad16c5565b4a69f9c2a9ac2c0dbc89462"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad16c5565b4a69f9c2a9ac2c0dbc89462">&#9670;&#160;</a></span>GLFW_VERSION_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_VERSION_UNAVAILABLE&#160;&#160;&#160;0x00010007</td>
</tr>
</table>
</div><div class="memdoc">
<p>The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.</p>
<dl class="section user"><dt>Analysis</dt><dd>The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
<dl class="section user"><dt></dt><dd>Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this error and not <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, because GLFW cannot know what future versions will exist. </dd></dl>
</div>
</div>
<a id="gad44162d78100ea5e87cdd38426b8c7a1" name="gad44162d78100ea5e87cdd38426b8c7a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad44162d78100ea5e87cdd38426b8c7a1">&#9670;&#160;</a></span>GLFW_PLATFORM_ERROR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_PLATFORM_ERROR&#160;&#160;&#160;0x00010008</td>
</tr>
</table>
</div><div class="memdoc">
<p>A platform-specific error occurred that does not match any of the more specific categories.</p>
<dl class="section user"><dt>Analysis</dt><dd>A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our <a href="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
</div>
</div>
<a id="ga196e125ef261d94184e2b55c05762f14" name="ga196e125ef261d94184e2b55c05762f14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga196e125ef261d94184e2b55c05762f14">&#9670;&#160;</a></span>GLFW_FORMAT_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_FORMAT_UNAVAILABLE&#160;&#160;&#160;0x00010009</td>
</tr>
</table>
</div><div class="memdoc">
<p>If emitted during window creation, the requested pixel format is not supported.</p>
<p>If emitted when querying the clipboard, the contents of the clipboard could not be converted to the requested format.</p>
<dl class="section user"><dt>Analysis</dt><dd>If emitted during window creation, one or more <a class="el" href="window_guide.html#window_hints_hard">hard constraints</a> did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
<dl class="section user"><dt></dt><dd>If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate. </dd></dl>
</div>
</div>
<a id="gacff24d2757da752ae4c80bf452356487" name="gacff24d2757da752ae4c80bf452356487"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacff24d2757da752ae4c80bf452356487">&#9670;&#160;</a></span>GLFW_NO_WINDOW_CONTEXT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_NO_WINDOW_CONTEXT&#160;&#160;&#160;0x0001000A</td>
</tr>
</table>
</div><div class="memdoc">
<p>A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.</p>
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
</div>
</div>
<a id="ga09d6943923a70ddef3a085f5baee786c" name="ga09d6943923a70ddef3a085f5baee786c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga09d6943923a70ddef3a085f5baee786c">&#9670;&#160;</a></span>GLFW_CURSOR_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_CURSOR_UNAVAILABLE&#160;&#160;&#160;0x0001000B</td>
</tr>
</table>
</div><div class="memdoc">
<p>The specified standard cursor shape is not available, either because the current platform cursor theme does not provide it or because it is not available on the platform.</p>
<dl class="section user"><dt>Analysis</dt><dd>Platform or system settings limitation. Pick another <a class="el" href="group__shapes.html">standard cursor shape</a> or create a <a class="el" href="input_guide.html#cursor_custom">custom cursor</a>. </dd></dl>
</div>
</div>
<a id="ga526fba20a01504a8086c763b6ca53ce5" name="ga526fba20a01504a8086c763b6ca53ce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga526fba20a01504a8086c763b6ca53ce5">&#9670;&#160;</a></span>GLFW_FEATURE_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_FEATURE_UNAVAILABLE&#160;&#160;&#160;0x0001000C</td>
</tr>
</table>
</div><div class="memdoc">
<p>The requested feature is not provided by the platform, so GLFW is unable to implement it. The documentation for each function notes if it could emit this error.</p>
<dl class="section user"><dt>Analysis</dt><dd>Platform or platform version limitation. The error can be ignored unless the feature is critical to the application.</dd></dl>
<dl class="section user"><dt></dt><dd>A function call that emits this error has no effect other than the error and updating any existing out parameters. </dd></dl>
</div>
</div>
<a id="ga5dda77e023e83151e8bd55a6758f946a" name="ga5dda77e023e83151e8bd55a6758f946a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5dda77e023e83151e8bd55a6758f946a">&#9670;&#160;</a></span>GLFW_FEATURE_UNIMPLEMENTED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_FEATURE_UNIMPLEMENTED&#160;&#160;&#160;0x0001000D</td>
</tr>
</table>
</div><div class="memdoc">
<p>The requested feature has not yet been implemented in GLFW for this platform.</p>
<dl class="section user"><dt>Analysis</dt><dd>An incomplete implementation of GLFW for this platform, hopefully fixed in a future release. The error can be ignored unless the feature is critical to the application.</dd></dl>
<dl class="section user"><dt></dt><dd>A function call that emits this error has no effect other than the error and updating any existing out parameters. </dd></dl>
</div>
</div>
<a id="ga3608c6c29ab7a72f3bf019f4c3a2563d" name="ga3608c6c29ab7a72f3bf019f4c3a2563d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3608c6c29ab7a72f3bf019f4c3a2563d">&#9670;&#160;</a></span>GLFW_PLATFORM_UNAVAILABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_PLATFORM_UNAVAILABLE&#160;&#160;&#160;0x0001000E</td>
</tr>
</table>
</div><div class="memdoc">
<p>If emitted during initialization, no matching platform was found. If the <a class="el" href="intro_guide.html#GLFW_PLATFORM">GLFW_PLATFORM</a> init hint was set to <code>GLFW_ANY_PLATFORM</code>, GLFW could not detect any of the platforms supported by this library binary, except for the Null platform. If the init hint was set to a specific platform, it is either not supported by this library binary or GLFW was not able to detect it.</p>
<p>If emitted by a native access function, GLFW was initialized for a different platform than the function is for.</p>
<dl class="section user"><dt>Analysis</dt><dd>Failure to detect any platform usually only happens on non-macOS Unix systems, either when no window system is running or the program was run from a terminal that does not have the necessary environment variables. Fall back to a different platform if possible or notify the user that no usable platform was detected.</dd></dl>
<p>Failure to detect a specific platform may have the same cause as above or be because support for that platform was not compiled in. Call <a class="el" href="group__init.html#ga8785d2b6b36632368d803e78079d38ed">glfwPlatformSupported</a> to check whether a specific platform is supported by a library binary. </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,202 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Gamepad axes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Gamepad axes<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#gamepad">Gamepad input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga544e396d092036a7d80c1e5f233f7a38" id="r_ga544e396d092036a7d80c1e5f233f7a38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38">GLFW_GAMEPAD_AXIS_LEFT_X</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga544e396d092036a7d80c1e5f233f7a38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64dcf2c6e9be50b7c556ff7671996dd5" id="r_ga64dcf2c6e9be50b7c556ff7671996dd5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5">GLFW_GAMEPAD_AXIS_LEFT_Y</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga64dcf2c6e9be50b7c556ff7671996dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd6785106cd3c5a044a6e49a395ee2fc" id="r_gabd6785106cd3c5a044a6e49a395ee2fc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc">GLFW_GAMEPAD_AXIS_RIGHT_X</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:gabd6785106cd3c5a044a6e49a395ee2fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cc20566d44d521b7183681a8e88e2e4" id="r_ga1cc20566d44d521b7183681a8e88e2e4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4">GLFW_GAMEPAD_AXIS_RIGHT_Y</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga1cc20566d44d521b7183681a8e88e2e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d79561dd8907c37354426242901b86e" id="r_ga6d79561dd8907c37354426242901b86e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e">GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:ga6d79561dd8907c37354426242901b86e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga121a7d5d20589a423cd1634dd6ee6eab" id="r_ga121a7d5d20589a423cd1634dd6ee6eab"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:ga121a7d5d20589a423cd1634dd6ee6eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0818fd9433e1359692b7443293e5ac86" id="r_ga0818fd9433e1359692b7443293e5ac86"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86">GLFW_GAMEPAD_AXIS_LAST</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td></tr>
<tr class="separator:ga0818fd9433e1359692b7443293e5ac86"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga544e396d092036a7d80c1e5f233f7a38" name="ga544e396d092036a7d80c1e5f233f7a38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga544e396d092036a7d80c1e5f233f7a38">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_LEFT_X</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_X&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga64dcf2c6e9be50b7c556ff7671996dd5" name="ga64dcf2c6e9be50b7c556ff7671996dd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64dcf2c6e9be50b7c556ff7671996dd5">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_LEFT_Y</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_Y&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gabd6785106cd3c5a044a6e49a395ee2fc" name="gabd6785106cd3c5a044a6e49a395ee2fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd6785106cd3c5a044a6e49a395ee2fc">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_X</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_X&#160;&#160;&#160;2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga1cc20566d44d521b7183681a8e88e2e4" name="ga1cc20566d44d521b7183681a8e88e2e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1cc20566d44d521b7183681a8e88e2e4">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_Y</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_Y&#160;&#160;&#160;3</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga6d79561dd8907c37354426242901b86e" name="ga6d79561dd8907c37354426242901b86e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6d79561dd8907c37354426242901b86e">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER&#160;&#160;&#160;4</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga121a7d5d20589a423cd1634dd6ee6eab" name="ga121a7d5d20589a423cd1634dd6ee6eab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga121a7d5d20589a423cd1634dd6ee6eab">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER&#160;&#160;&#160;5</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga0818fd9433e1359692b7443293e5ac86" name="ga0818fd9433e1359692b7443293e5ac86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0818fd9433e1359692b7443293e5ac86">&#9670;&#160;</a></span>GLFW_GAMEPAD_AXIS_LAST</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_AXIS_LAST&#160;&#160;&#160;<a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,410 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Gamepad buttons</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Gamepad buttons<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#gamepad">Gamepad input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae055a12fbf4b48b5954c8e1cd129b810" id="r_gae055a12fbf4b48b5954c8e1cd129b810"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:gae055a12fbf4b48b5954c8e1cd129b810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2228a6512fd5950cdb51ba07846546fa" id="r_ga2228a6512fd5950cdb51ba07846546fa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga2228a6512fd5950cdb51ba07846546fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga52cc94785cf3fe9a12e246539259887c" id="r_ga52cc94785cf3fe9a12e246539259887c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga52cc94785cf3fe9a12e246539259887c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc931248bda494b530cbe057f386a5ed" id="r_gafc931248bda494b530cbe057f386a5ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:gafc931248bda494b530cbe057f386a5ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17d67b4f39a39d6b813bd1567a3507c3" id="r_ga17d67b4f39a39d6b813bd1567a3507c3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3">GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:ga17d67b4f39a39d6b813bd1567a3507c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfbc9ea9bf3aae896b79fa49fdc85c7f" id="r_gadfbc9ea9bf3aae896b79fa49fdc85c7f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f">GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:gadfbc9ea9bf3aae896b79fa49fdc85c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc7c0264ce778835b516a472b47f6caf" id="r_gabc7c0264ce778835b516a472b47f6caf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf">GLFW_GAMEPAD_BUTTON_BACK</a>&#160;&#160;&#160;6</td></tr>
<tr class="separator:gabc7c0264ce778835b516a472b47f6caf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga04606949dd9139434b8a1bedf4ac1021" id="r_ga04606949dd9139434b8a1bedf4ac1021"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021">GLFW_GAMEPAD_BUTTON_START</a>&#160;&#160;&#160;7</td></tr>
<tr class="separator:ga04606949dd9139434b8a1bedf4ac1021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7fa48c32e5b2f5db2f080aa0b8b573dc" id="r_ga7fa48c32e5b2f5db2f080aa0b8b573dc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc">GLFW_GAMEPAD_BUTTON_GUIDE</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:ga7fa48c32e5b2f5db2f080aa0b8b573dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e089787327454f7bfca7364d6ca206a" id="r_ga3e089787327454f7bfca7364d6ca206a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a">GLFW_GAMEPAD_BUTTON_LEFT_THUMB</a>&#160;&#160;&#160;9</td></tr>
<tr class="separator:ga3e089787327454f7bfca7364d6ca206a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c003f52b5aebb45272475b48953b21a" id="r_ga1c003f52b5aebb45272475b48953b21a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a">GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:ga1c003f52b5aebb45272475b48953b21a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f1ed6f974a47bc8930d4874a283476a" id="r_ga4f1ed6f974a47bc8930d4874a283476a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a">GLFW_GAMEPAD_BUTTON_DPAD_UP</a>&#160;&#160;&#160;11</td></tr>
<tr class="separator:ga4f1ed6f974a47bc8930d4874a283476a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2a780d2a8c79e0b77c0b7b601ca57c6" id="r_gae2a780d2a8c79e0b77c0b7b601ca57c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6">GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</a>&#160;&#160;&#160;12</td></tr>
<tr class="separator:gae2a780d2a8c79e0b77c0b7b601ca57c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f2b731b97d80f90f11967a83207665c" id="r_ga8f2b731b97d80f90f11967a83207665c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c">GLFW_GAMEPAD_BUTTON_DPAD_DOWN</a>&#160;&#160;&#160;13</td></tr>
<tr class="separator:ga8f2b731b97d80f90f11967a83207665c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0697e0e8607b2ebe1c93b0c6befe301" id="r_gaf0697e0e8607b2ebe1c93b0c6befe301"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a>&#160;&#160;&#160;14</td></tr>
<tr class="separator:gaf0697e0e8607b2ebe1c93b0c6befe301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5cc98882f4f81dacf761639a567f61eb" id="r_ga5cc98882f4f81dacf761639a567f61eb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb">GLFW_GAMEPAD_BUTTON_LAST</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td></tr>
<tr class="separator:ga5cc98882f4f81dacf761639a567f61eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf08d0df26527c9305253422bd98ed63a" id="r_gaf08d0df26527c9305253422bd98ed63a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a">GLFW_GAMEPAD_BUTTON_CROSS</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a></td></tr>
<tr class="separator:gaf08d0df26527c9305253422bd98ed63a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaef094b3dacbf15f272b274516839b82" id="r_gaaef094b3dacbf15f272b274516839b82"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82">GLFW_GAMEPAD_BUTTON_CIRCLE</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a></td></tr>
<tr class="separator:gaaef094b3dacbf15f272b274516839b82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc7821e87d77d41ed2cd3e1f726ec35f" id="r_gafc7821e87d77d41ed2cd3e1f726ec35f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f">GLFW_GAMEPAD_BUTTON_SQUARE</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a></td></tr>
<tr class="separator:gafc7821e87d77d41ed2cd3e1f726ec35f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a7ef6bcb768a08cd3bf142f7f09f802" id="r_ga3a7ef6bcb768a08cd3bf142f7f09f802"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802">GLFW_GAMEPAD_BUTTON_TRIANGLE</a>&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a></td></tr>
<tr class="separator:ga3a7ef6bcb768a08cd3bf142f7f09f802"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gae055a12fbf4b48b5954c8e1cd129b810" name="gae055a12fbf4b48b5954c8e1cd129b810"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae055a12fbf4b48b5954c8e1cd129b810">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_A</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_A&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga2228a6512fd5950cdb51ba07846546fa" name="ga2228a6512fd5950cdb51ba07846546fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2228a6512fd5950cdb51ba07846546fa">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_B</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_B&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga52cc94785cf3fe9a12e246539259887c" name="ga52cc94785cf3fe9a12e246539259887c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga52cc94785cf3fe9a12e246539259887c">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_X</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_X&#160;&#160;&#160;2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gafc931248bda494b530cbe057f386a5ed" name="gafc931248bda494b530cbe057f386a5ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc931248bda494b530cbe057f386a5ed">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_Y</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_Y&#160;&#160;&#160;3</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga17d67b4f39a39d6b813bd1567a3507c3" name="ga17d67b4f39a39d6b813bd1567a3507c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga17d67b4f39a39d6b813bd1567a3507c3">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER&#160;&#160;&#160;4</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gadfbc9ea9bf3aae896b79fa49fdc85c7f" name="gadfbc9ea9bf3aae896b79fa49fdc85c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadfbc9ea9bf3aae896b79fa49fdc85c7f">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER&#160;&#160;&#160;5</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gabc7c0264ce778835b516a472b47f6caf" name="gabc7c0264ce778835b516a472b47f6caf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabc7c0264ce778835b516a472b47f6caf">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_BACK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_BACK&#160;&#160;&#160;6</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga04606949dd9139434b8a1bedf4ac1021" name="ga04606949dd9139434b8a1bedf4ac1021"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga04606949dd9139434b8a1bedf4ac1021">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_START</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_START&#160;&#160;&#160;7</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga7fa48c32e5b2f5db2f080aa0b8b573dc" name="ga7fa48c32e5b2f5db2f080aa0b8b573dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7fa48c32e5b2f5db2f080aa0b8b573dc">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_GUIDE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_GUIDE&#160;&#160;&#160;8</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga3e089787327454f7bfca7364d6ca206a" name="ga3e089787327454f7bfca7364d6ca206a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e089787327454f7bfca7364d6ca206a">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_LEFT_THUMB</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB&#160;&#160;&#160;9</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga1c003f52b5aebb45272475b48953b21a" name="ga1c003f52b5aebb45272475b48953b21a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1c003f52b5aebb45272475b48953b21a">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB&#160;&#160;&#160;10</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga4f1ed6f974a47bc8930d4874a283476a" name="ga4f1ed6f974a47bc8930d4874a283476a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f1ed6f974a47bc8930d4874a283476a">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_UP</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_UP&#160;&#160;&#160;11</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gae2a780d2a8c79e0b77c0b7b601ca57c6" name="gae2a780d2a8c79e0b77c0b7b601ca57c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2a780d2a8c79e0b77c0b7b601ca57c6">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT&#160;&#160;&#160;12</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga8f2b731b97d80f90f11967a83207665c" name="ga8f2b731b97d80f90f11967a83207665c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8f2b731b97d80f90f11967a83207665c">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_DOWN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN&#160;&#160;&#160;13</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaf0697e0e8607b2ebe1c93b0c6befe301" name="gaf0697e0e8607b2ebe1c93b0c6befe301"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf0697e0e8607b2ebe1c93b0c6befe301">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_DPAD_LEFT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT&#160;&#160;&#160;14</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga5cc98882f4f81dacf761639a567f61eb" name="ga5cc98882f4f81dacf761639a567f61eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5cc98882f4f81dacf761639a567f61eb">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_LAST</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LAST&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaf08d0df26527c9305253422bd98ed63a" name="gaf08d0df26527c9305253422bd98ed63a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf08d0df26527c9305253422bd98ed63a">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_CROSS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_CROSS&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaaef094b3dacbf15f272b274516839b82" name="gaaef094b3dacbf15f272b274516839b82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaef094b3dacbf15f272b274516839b82">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_CIRCLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_CIRCLE&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gafc7821e87d77d41ed2cd3e1f726ec35f" name="gafc7821e87d77d41ed2cd3e1f726ec35f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc7821e87d77d41ed2cd3e1f726ec35f">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_SQUARE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_SQUARE&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga3a7ef6bcb768a08cd3bf142f7f09f802" name="ga3a7ef6bcb768a08cd3bf142f7f09f802"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3a7ef6bcb768a08cd3bf142f7f09f802">&#9670;&#160;</a></span>GLFW_GAMEPAD_BUTTON_TRIANGLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_GAMEPAD_BUTTON_TRIANGLE&#160;&#160;&#160;<a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,234 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Joystick hat states</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Joystick hat states<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#joystick_hat">joystick hat input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae2c0bcb7aec609e4736437554f6638fd" id="r_gae2c0bcb7aec609e4736437554f6638fd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd">GLFW_HAT_CENTERED</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:gae2c0bcb7aec609e4736437554f6638fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8c9720c76cd1b912738159ed74c85b36" id="r_ga8c9720c76cd1b912738159ed74c85b36"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga8c9720c76cd1b912738159ed74c85b36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga252586e3bbde75f4b0e07ad3124867f5" id="r_ga252586e3bbde75f4b0e07ad3124867f5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga252586e3bbde75f4b0e07ad3124867f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad60d1fd0dc85c18f2642cbae96d3deff" id="r_gad60d1fd0dc85c18f2642cbae96d3deff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:gad60d1fd0dc85c18f2642cbae96d3deff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac775f4b3154fdf5db93eb432ba546dff" id="r_gac775f4b3154fdf5db93eb432ba546dff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:gac775f4b3154fdf5db93eb432ba546dff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga94aea0ae241a8b902883536c592ee693" id="r_ga94aea0ae241a8b902883536c592ee693"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga94aea0ae241a8b902883536c592ee693">GLFW_HAT_RIGHT_UP</a>&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td></tr>
<tr class="separator:ga94aea0ae241a8b902883536c592ee693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad7f0e4f52fd68d734863aaeadab3a3f5" id="r_gad7f0e4f52fd68d734863aaeadab3a3f5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5">GLFW_HAT_RIGHT_DOWN</a>&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td></tr>
<tr class="separator:gad7f0e4f52fd68d734863aaeadab3a3f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga638f0e20dc5de90de21a33564e8ce129" id="r_ga638f0e20dc5de90de21a33564e8ce129"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129">GLFW_HAT_LEFT_UP</a>&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td></tr>
<tr class="separator:ga638f0e20dc5de90de21a33564e8ce129"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76c02baf1ea345fcbe3e8ff176a73e19" id="r_ga76c02baf1ea345fcbe3e8ff176a73e19"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19">GLFW_HAT_LEFT_DOWN</a>&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td></tr>
<tr class="separator:ga76c02baf1ea345fcbe3e8ff176a73e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gae2c0bcb7aec609e4736437554f6638fd" name="gae2c0bcb7aec609e4736437554f6638fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae2c0bcb7aec609e4736437554f6638fd">&#9670;&#160;</a></span>GLFW_HAT_CENTERED</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_CENTERED&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga8c9720c76cd1b912738159ed74c85b36" name="ga8c9720c76cd1b912738159ed74c85b36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8c9720c76cd1b912738159ed74c85b36">&#9670;&#160;</a></span>GLFW_HAT_UP</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_UP&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga252586e3bbde75f4b0e07ad3124867f5" name="ga252586e3bbde75f4b0e07ad3124867f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga252586e3bbde75f4b0e07ad3124867f5">&#9670;&#160;</a></span>GLFW_HAT_RIGHT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_RIGHT&#160;&#160;&#160;2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gad60d1fd0dc85c18f2642cbae96d3deff" name="gad60d1fd0dc85c18f2642cbae96d3deff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad60d1fd0dc85c18f2642cbae96d3deff">&#9670;&#160;</a></span>GLFW_HAT_DOWN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_DOWN&#160;&#160;&#160;4</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gac775f4b3154fdf5db93eb432ba546dff" name="gac775f4b3154fdf5db93eb432ba546dff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac775f4b3154fdf5db93eb432ba546dff">&#9670;&#160;</a></span>GLFW_HAT_LEFT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_LEFT&#160;&#160;&#160;8</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga94aea0ae241a8b902883536c592ee693" name="ga94aea0ae241a8b902883536c592ee693"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga94aea0ae241a8b902883536c592ee693">&#9670;&#160;</a></span>GLFW_HAT_RIGHT_UP</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_RIGHT_UP&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gad7f0e4f52fd68d734863aaeadab3a3f5" name="gad7f0e4f52fd68d734863aaeadab3a3f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad7f0e4f52fd68d734863aaeadab3a3f5">&#9670;&#160;</a></span>GLFW_HAT_RIGHT_DOWN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_RIGHT_DOWN&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga638f0e20dc5de90de21a33564e8ce129" name="ga638f0e20dc5de90de21a33564e8ce129"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga638f0e20dc5de90de21a33564e8ce129">&#9670;&#160;</a></span>GLFW_HAT_LEFT_UP</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_LEFT_UP&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga76c02baf1ea345fcbe3e8ff176a73e19" name="ga76c02baf1ea345fcbe3e8ff176a73e19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76c02baf1ea345fcbe3e8ff176a73e19">&#9670;&#160;</a></span>GLFW_HAT_LEFT_DOWN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAT_LEFT_DOWN&#160;&#160;&#160;(<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,362 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Joysticks</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Joysticks<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#joystick">joystick input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga34a0443d059e9f22272cd4669073f73d" id="r_ga34a0443d059e9f22272cd4669073f73d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d">GLFW_JOYSTICK_1</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga34a0443d059e9f22272cd4669073f73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6eab65ec88e65e0850ef8413504cb50c" id="r_ga6eab65ec88e65e0850ef8413504cb50c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c">GLFW_JOYSTICK_2</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga6eab65ec88e65e0850ef8413504cb50c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6f3eedfeb42424c2f5e3161efb0b654" id="r_gae6f3eedfeb42424c2f5e3161efb0b654"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654">GLFW_JOYSTICK_3</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:gae6f3eedfeb42424c2f5e3161efb0b654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97ddbcad02b7f48d74fad4ddb08fff59" id="r_ga97ddbcad02b7f48d74fad4ddb08fff59"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59">GLFW_JOYSTICK_4</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:ga97ddbcad02b7f48d74fad4ddb08fff59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae43281bc66d3fa5089fb50c3e7a28695" id="r_gae43281bc66d3fa5089fb50c3e7a28695"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695">GLFW_JOYSTICK_5</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:gae43281bc66d3fa5089fb50c3e7a28695"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74771620aa53bd68a487186dea66fd77" id="r_ga74771620aa53bd68a487186dea66fd77"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga74771620aa53bd68a487186dea66fd77">GLFW_JOYSTICK_6</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:ga74771620aa53bd68a487186dea66fd77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20a9f4f3aaefed9ea5e66072fc588b87" id="r_ga20a9f4f3aaefed9ea5e66072fc588b87"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87">GLFW_JOYSTICK_7</a>&#160;&#160;&#160;6</td></tr>
<tr class="separator:ga20a9f4f3aaefed9ea5e66072fc588b87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21a934c940bcf25db0e4c8fe9b364bdb" id="r_ga21a934c940bcf25db0e4c8fe9b364bdb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb">GLFW_JOYSTICK_8</a>&#160;&#160;&#160;7</td></tr>
<tr class="separator:ga21a934c940bcf25db0e4c8fe9b364bdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87689d47df0ba6f9f5fcbbcaf7b3cecf" id="r_ga87689d47df0ba6f9f5fcbbcaf7b3cecf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf">GLFW_JOYSTICK_9</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:ga87689d47df0ba6f9f5fcbbcaf7b3cecf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaef55389ee605d6dfc31aef6fe98c54ec" id="r_gaef55389ee605d6dfc31aef6fe98c54ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec">GLFW_JOYSTICK_10</a>&#160;&#160;&#160;9</td></tr>
<tr class="separator:gaef55389ee605d6dfc31aef6fe98c54ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7d26e3df447c2c14a569fcc18516af4" id="r_gae7d26e3df447c2c14a569fcc18516af4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4">GLFW_JOYSTICK_11</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:gae7d26e3df447c2c14a569fcc18516af4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7" id="r_gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7">GLFW_JOYSTICK_12</a>&#160;&#160;&#160;11</td></tr>
<tr class="separator:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c84fb4e49bf661d7d7c78eb4018c508" id="r_ga5c84fb4e49bf661d7d7c78eb4018c508"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508">GLFW_JOYSTICK_13</a>&#160;&#160;&#160;12</td></tr>
<tr class="separator:ga5c84fb4e49bf661d7d7c78eb4018c508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga89540873278ae5a42b3e70d64164dc74" id="r_ga89540873278ae5a42b3e70d64164dc74"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74">GLFW_JOYSTICK_14</a>&#160;&#160;&#160;13</td></tr>
<tr class="separator:ga89540873278ae5a42b3e70d64164dc74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7b02ab70daf7a78bcc942d5d4cc1dcf9" id="r_ga7b02ab70daf7a78bcc942d5d4cc1dcf9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9">GLFW_JOYSTICK_15</a>&#160;&#160;&#160;14</td></tr>
<tr class="separator:ga7b02ab70daf7a78bcc942d5d4cc1dcf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga453edeeabf350827646b6857df4f80ce" id="r_ga453edeeabf350827646b6857df4f80ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a>&#160;&#160;&#160;15</td></tr>
<tr class="separator:ga453edeeabf350827646b6857df4f80ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ca13ebf24c331dd98df17d84a4b72c9" id="r_ga9ca13ebf24c331dd98df17d84a4b72c9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9">GLFW_JOYSTICK_LAST</a>&#160;&#160;&#160;<a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a></td></tr>
<tr class="separator:ga9ca13ebf24c331dd98df17d84a4b72c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga34a0443d059e9f22272cd4669073f73d" name="ga34a0443d059e9f22272cd4669073f73d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34a0443d059e9f22272cd4669073f73d">&#9670;&#160;</a></span>GLFW_JOYSTICK_1</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_1&#160;&#160;&#160;0</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga6eab65ec88e65e0850ef8413504cb50c" name="ga6eab65ec88e65e0850ef8413504cb50c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6eab65ec88e65e0850ef8413504cb50c">&#9670;&#160;</a></span>GLFW_JOYSTICK_2</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_2&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gae6f3eedfeb42424c2f5e3161efb0b654" name="gae6f3eedfeb42424c2f5e3161efb0b654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae6f3eedfeb42424c2f5e3161efb0b654">&#9670;&#160;</a></span>GLFW_JOYSTICK_3</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_3&#160;&#160;&#160;2</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga97ddbcad02b7f48d74fad4ddb08fff59" name="ga97ddbcad02b7f48d74fad4ddb08fff59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga97ddbcad02b7f48d74fad4ddb08fff59">&#9670;&#160;</a></span>GLFW_JOYSTICK_4</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_4&#160;&#160;&#160;3</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gae43281bc66d3fa5089fb50c3e7a28695" name="gae43281bc66d3fa5089fb50c3e7a28695"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae43281bc66d3fa5089fb50c3e7a28695">&#9670;&#160;</a></span>GLFW_JOYSTICK_5</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_5&#160;&#160;&#160;4</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga74771620aa53bd68a487186dea66fd77" name="ga74771620aa53bd68a487186dea66fd77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga74771620aa53bd68a487186dea66fd77">&#9670;&#160;</a></span>GLFW_JOYSTICK_6</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_6&#160;&#160;&#160;5</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga20a9f4f3aaefed9ea5e66072fc588b87" name="ga20a9f4f3aaefed9ea5e66072fc588b87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga20a9f4f3aaefed9ea5e66072fc588b87">&#9670;&#160;</a></span>GLFW_JOYSTICK_7</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_7&#160;&#160;&#160;6</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga21a934c940bcf25db0e4c8fe9b364bdb" name="ga21a934c940bcf25db0e4c8fe9b364bdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21a934c940bcf25db0e4c8fe9b364bdb">&#9670;&#160;</a></span>GLFW_JOYSTICK_8</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_8&#160;&#160;&#160;7</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga87689d47df0ba6f9f5fcbbcaf7b3cecf" name="ga87689d47df0ba6f9f5fcbbcaf7b3cecf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87689d47df0ba6f9f5fcbbcaf7b3cecf">&#9670;&#160;</a></span>GLFW_JOYSTICK_9</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_9&#160;&#160;&#160;8</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gaef55389ee605d6dfc31aef6fe98c54ec" name="gaef55389ee605d6dfc31aef6fe98c54ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef55389ee605d6dfc31aef6fe98c54ec">&#9670;&#160;</a></span>GLFW_JOYSTICK_10</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_10&#160;&#160;&#160;9</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gae7d26e3df447c2c14a569fcc18516af4" name="gae7d26e3df447c2c14a569fcc18516af4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae7d26e3df447c2c14a569fcc18516af4">&#9670;&#160;</a></span>GLFW_JOYSTICK_11</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_11&#160;&#160;&#160;10</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="gab91bbf5b7ca6be8d3ac5c4d89ff48ac7" name="gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7">&#9670;&#160;</a></span>GLFW_JOYSTICK_12</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_12&#160;&#160;&#160;11</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga5c84fb4e49bf661d7d7c78eb4018c508" name="ga5c84fb4e49bf661d7d7c78eb4018c508"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5c84fb4e49bf661d7d7c78eb4018c508">&#9670;&#160;</a></span>GLFW_JOYSTICK_13</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_13&#160;&#160;&#160;12</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga89540873278ae5a42b3e70d64164dc74" name="ga89540873278ae5a42b3e70d64164dc74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89540873278ae5a42b3e70d64164dc74">&#9670;&#160;</a></span>GLFW_JOYSTICK_14</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_14&#160;&#160;&#160;13</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga7b02ab70daf7a78bcc942d5d4cc1dcf9" name="ga7b02ab70daf7a78bcc942d5d4cc1dcf9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7b02ab70daf7a78bcc942d5d4cc1dcf9">&#9670;&#160;</a></span>GLFW_JOYSTICK_15</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_15&#160;&#160;&#160;14</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga453edeeabf350827646b6857df4f80ce" name="ga453edeeabf350827646b6857df4f80ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga453edeeabf350827646b6857df4f80ce">&#9670;&#160;</a></span>GLFW_JOYSTICK_16</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_16&#160;&#160;&#160;15</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga9ca13ebf24c331dd98df17d84a4b72c9" name="ga9ca13ebf24c331dd98df17d84a4b72c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9ca13ebf24c331dd98df17d84a4b72c9">&#9670;&#160;</a></span>GLFW_JOYSTICK_LAST</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_JOYSTICK_LAST&#160;&#160;&#160;<a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Modifier key flags</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Modifier key flags<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>See <a class="el" href="input_guide.html#input_key">key input</a> for how these are used. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga14994d3196c290aaa347248e51740274" id="r_ga14994d3196c290aaa347248e51740274"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga14994d3196c290aaa347248e51740274">GLFW_MOD_SHIFT</a>&#160;&#160;&#160;0x0001</td></tr>
<tr class="memdesc:ga14994d3196c290aaa347248e51740274"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set one or more Shift keys were held down. <br /></td></tr>
<tr class="separator:ga14994d3196c290aaa347248e51740274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ed94871c3208eefd85713fa929d45aa" id="r_ga6ed94871c3208eefd85713fa929d45aa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga6ed94871c3208eefd85713fa929d45aa">GLFW_MOD_CONTROL</a>&#160;&#160;&#160;0x0002</td></tr>
<tr class="memdesc:ga6ed94871c3208eefd85713fa929d45aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set one or more Control keys were held down. <br /></td></tr>
<tr class="separator:ga6ed94871c3208eefd85713fa929d45aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2acd5633463c29e07008687ea73c0f4" id="r_gad2acd5633463c29e07008687ea73c0f4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#gad2acd5633463c29e07008687ea73c0f4">GLFW_MOD_ALT</a>&#160;&#160;&#160;0x0004</td></tr>
<tr class="memdesc:gad2acd5633463c29e07008687ea73c0f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set one or more Alt keys were held down. <br /></td></tr>
<tr class="separator:gad2acd5633463c29e07008687ea73c0f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6b64ba10ea0227cf6f42efd0a220aba1" id="r_ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1">GLFW_MOD_SUPER</a>&#160;&#160;&#160;0x0008</td></tr>
<tr class="memdesc:ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set one or more Super keys were held down. <br /></td></tr>
<tr class="separator:ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaefeef8fcf825a6e43e241b337897200f" id="r_gaefeef8fcf825a6e43e241b337897200f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#gaefeef8fcf825a6e43e241b337897200f">GLFW_MOD_CAPS_LOCK</a>&#160;&#160;&#160;0x0010</td></tr>
<tr class="memdesc:gaefeef8fcf825a6e43e241b337897200f"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set the Caps Lock key is enabled. <br /></td></tr>
<tr class="separator:gaefeef8fcf825a6e43e241b337897200f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64e020b8a42af8376e944baf61feecbe" id="r_ga64e020b8a42af8376e944baf61feecbe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga64e020b8a42af8376e944baf61feecbe">GLFW_MOD_NUM_LOCK</a>&#160;&#160;&#160;0x0020</td></tr>
<tr class="memdesc:ga64e020b8a42af8376e944baf61feecbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this bit is set the Num Lock key is enabled. <br /></td></tr>
<tr class="separator:ga64e020b8a42af8376e944baf61feecbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga14994d3196c290aaa347248e51740274" name="ga14994d3196c290aaa347248e51740274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga14994d3196c290aaa347248e51740274">&#9670;&#160;</a></span>GLFW_MOD_SHIFT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_SHIFT&#160;&#160;&#160;0x0001</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set one or more Shift keys were held down. </p>
</div>
</div>
<a id="ga6ed94871c3208eefd85713fa929d45aa" name="ga6ed94871c3208eefd85713fa929d45aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6ed94871c3208eefd85713fa929d45aa">&#9670;&#160;</a></span>GLFW_MOD_CONTROL</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_CONTROL&#160;&#160;&#160;0x0002</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set one or more Control keys were held down. </p>
</div>
</div>
<a id="gad2acd5633463c29e07008687ea73c0f4" name="gad2acd5633463c29e07008687ea73c0f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2acd5633463c29e07008687ea73c0f4">&#9670;&#160;</a></span>GLFW_MOD_ALT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_ALT&#160;&#160;&#160;0x0004</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set one or more Alt keys were held down. </p>
</div>
</div>
<a id="ga6b64ba10ea0227cf6f42efd0a220aba1" name="ga6b64ba10ea0227cf6f42efd0a220aba1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6b64ba10ea0227cf6f42efd0a220aba1">&#9670;&#160;</a></span>GLFW_MOD_SUPER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_SUPER&#160;&#160;&#160;0x0008</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set one or more Super keys were held down. </p>
</div>
</div>
<a id="gaefeef8fcf825a6e43e241b337897200f" name="gaefeef8fcf825a6e43e241b337897200f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaefeef8fcf825a6e43e241b337897200f">&#9670;&#160;</a></span>GLFW_MOD_CAPS_LOCK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_CAPS_LOCK&#160;&#160;&#160;0x0010</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set the Caps Lock key is enabled and the <a class="el" href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>
</div>
</div>
<a id="ga64e020b8a42af8376e944baf61feecbe" name="ga64e020b8a42af8376e944baf61feecbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64e020b8a42af8376e944baf61feecbe">&#9670;&#160;</a></span>GLFW_MOD_NUM_LOCK</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_MOD_NUM_LOCK&#160;&#160;&#160;0x0020</td>
</tr>
</table>
</div><div class="memdoc">
<p>If this bit is set the Num Lock key is enabled and the <a class="el" href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,849 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Monitor reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">Monitor reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>This is the reference documentation for monitor related functions and types. For more task-oriented information, see the <a class="el" href="monitor_guide.html">Monitor guide</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga8d9efd1cde9426692c73fe40437d0ae3" id="r_ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td></tr>
<tr class="memdesc:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque monitor object. <br /></td></tr>
<tr class="separator:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabe16caca8dea952504dfdebdf4cd249" id="r_gaabe16caca8dea952504dfdebdf4cd249"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a>) (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int event)</td></tr>
<tr class="memdesc:gaabe16caca8dea952504dfdebdf4cd249"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function pointer type for monitor configuration callbacks. <br /></td></tr>
<tr class="separator:gaabe16caca8dea952504dfdebdf4cd249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga902c2816ac9b34b757282daab59b2565" id="r_ga902c2816ac9b34b757282daab59b2565"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga902c2816ac9b34b757282daab59b2565">GLFWvidmode</a></td></tr>
<tr class="memdesc:ga902c2816ac9b34b757282daab59b2565"><td class="mdescLeft">&#160;</td><td class="mdescRight">Video mode type. <br /></td></tr>
<tr class="separator:ga902c2816ac9b34b757282daab59b2565"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga939cf093cb0af0498b7b54dc2e181404" id="r_ga939cf093cb0af0498b7b54dc2e181404"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga939cf093cb0af0498b7b54dc2e181404">GLFWgammaramp</a></td></tr>
<tr class="memdesc:ga939cf093cb0af0498b7b54dc2e181404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gamma ramp. <br /></td></tr>
<tr class="separator:ga939cf093cb0af0498b7b54dc2e181404"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga70b1156d5d24e9928f145d6c864369d2" id="r_ga70b1156d5d24e9928f145d6c864369d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a> (int *count)</td></tr>
<tr class="memdesc:ga70b1156d5d24e9928f145d6c864369d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the currently connected monitors. <br /></td></tr>
<tr class="separator:ga70b1156d5d24e9928f145d6c864369d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3adb24947eb709e1874028272e5dfc5" id="r_gac3adb24947eb709e1874028272e5dfc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a> (void)</td></tr>
<tr class="memdesc:gac3adb24947eb709e1874028272e5dfc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the primary monitor. <br /></td></tr>
<tr class="separator:gac3adb24947eb709e1874028272e5dfc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga102f54e7acc9149edbcf0997152df8c9" id="r_ga102f54e7acc9149edbcf0997152df8c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>
<tr class="memdesc:ga102f54e7acc9149edbcf0997152df8c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the position of the monitor's viewport on the virtual screen. <br /></td></tr>
<tr class="separator:ga102f54e7acc9149edbcf0997152df8c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0" id="r_ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">glfwGetMonitorWorkarea</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos, int *width, int *height)</td></tr>
<tr class="memdesc:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the work area of the monitor. <br /></td></tr>
<tr class="separator:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d8bffc6c55539286a6bd20d32a8d7ea" id="r_ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *widthMM, int *heightMM)</td></tr>
<tr class="memdesc:ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the physical size of the monitor. <br /></td></tr>
<tr class="separator:ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad3152e84465fa620b601265ebfcdb21b" id="r_gad3152e84465fa620b601265ebfcdb21b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">glfwGetMonitorContentScale</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, float *xscale, float *yscale)</td></tr>
<tr class="memdesc:gad3152e84465fa620b601265ebfcdb21b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the content scale for the specified monitor. <br /></td></tr>
<tr class="separator:gad3152e84465fa620b601265ebfcdb21b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7af83e13489d90379588fb331b9e4b68" id="r_ga7af83e13489d90379588fb331b9e4b68"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga7af83e13489d90379588fb331b9e4b68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the specified monitor. <br /></td></tr>
<tr class="separator:ga7af83e13489d90379588fb331b9e4b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga702750e24313a686d3637297b6e85fda" id="r_ga702750e24313a686d3637297b6e85fda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">glfwSetMonitorUserPointer</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, void *pointer)</td></tr>
<tr class="memdesc:ga702750e24313a686d3637297b6e85fda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the user pointer of the specified monitor. <br /></td></tr>
<tr class="separator:ga702750e24313a686d3637297b6e85fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1adbfbfb8cd58b23cfee82e574fbbdc5" id="r_ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the user pointer of the specified monitor. <br /></td></tr>
<tr class="separator:ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab39df645587c8518192aa746c2fb06c3" id="r_gab39df645587c8518192aa746c2fb06c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a> (<a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> callback)</td></tr>
<tr class="memdesc:gab39df645587c8518192aa746c2fb06c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the monitor configuration callback. <br /></td></tr>
<tr class="separator:gab39df645587c8518192aa746c2fb06c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2e24d2843cb7d6c26202cddd530fc1b" id="r_gad2e24d2843cb7d6c26202cddd530fc1b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *count)</td></tr>
<tr class="memdesc:gad2e24d2843cb7d6c26202cddd530fc1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the available video modes for the specified monitor. <br /></td></tr>
<tr class="separator:gad2e24d2843cb7d6c26202cddd530fc1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba376fa7e76634b4788bddc505d6c9d5" id="r_gaba376fa7e76634b4788bddc505d6c9d5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gaba376fa7e76634b4788bddc505d6c9d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current mode of the specified monitor. <br /></td></tr>
<tr class="separator:gaba376fa7e76634b4788bddc505d6c9d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6ac582625c990220785ddd34efa3169a" id="r_ga6ac582625c990220785ddd34efa3169a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, float gamma)</td></tr>
<tr class="memdesc:ga6ac582625c990220785ddd34efa3169a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a gamma ramp and sets it for the specified monitor. <br /></td></tr>
<tr class="separator:ga6ac582625c990220785ddd34efa3169a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76ba90debcf0062b5c4b73052b24f96f" id="r_ga76ba90debcf0062b5c4b73052b24f96f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga76ba90debcf0062b5c4b73052b24f96f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current gamma ramp for the specified monitor. <br /></td></tr>
<tr class="separator:ga76ba90debcf0062b5c4b73052b24f96f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga583f0ffd0d29613d8cd172b996bbf0dd" id="r_ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, const <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a> *ramp)</td></tr>
<tr class="memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current gamma ramp for the specified monitor. <br /></td></tr>
<tr class="separator:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga8d9efd1cde9426692c73fe40437d0ae3" name="ga8d9efd1cde9426692c73fe40437d0ae3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d9efd1cde9426692c73fe40437d0ae3">&#9670;&#160;</a></span>GLFWmonitor</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Opaque monitor object.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_object">Monitor objects</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gaabe16caca8dea952504dfdebdf4cd249" name="gaabe16caca8dea952504dfdebdf4cd249"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaabe16caca8dea952504dfdebdf4cd249">&#9670;&#160;</a></span>GLFWmonitorfun</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* GLFWmonitorfun) (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int event)</td>
</tr>
</table>
</div><div class="memdoc">
<p>This is the function pointer type for monitor configuration callbacks. A monitor callback function has the following signature: </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> function_name(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor, <span class="keywordtype">int</span> event)</div>
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1391</div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor that was connected or disconnected. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>. Future releases may add more events.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga902c2816ac9b34b757282daab59b2565" name="ga902c2816ac9b34b757282daab59b2565"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga902c2816ac9b34b757282daab59b2565">&#9670;&#160;</a></span>GLFWvidmode</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This describes a single video mode.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added refresh rate member. </dd></dl>
</div>
</div>
<a id="ga939cf093cb0af0498b7b54dc2e181404" name="ga939cf093cb0af0498b7b54dc2e181404"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga939cf093cb0af0498b7b54dc2e181404">&#9670;&#160;</a></span>GLFWgammaramp</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a> <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This describes the gamma ramp for a monitor.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a> </dd>
<dd>
<a class="el" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a> </dd>
<dd>
<a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga70b1156d5d24e9928f145d6c864369d2" name="ga70b1156d5d24e9928f145d6c864369d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga70b1156d5d24e9928f145d6c864369d2">&#9670;&#160;</a></span>glfwGetMonitors()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> ** glfwGetMonitors </td>
<td>(</td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns <code>NULL</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of monitors in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of monitor handles, or <code>NULL</code> if no monitors were found or if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_monitors">Retrieving monitors</a> </dd>
<dd>
<a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gac3adb24947eb709e1874028272e5dfc5" name="gac3adb24947eb709e1874028272e5dfc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3adb24947eb709e1874028272e5dfc5">&#9670;&#160;</a></span>glfwGetPrimaryMonitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * glfwGetPrimaryMonitor </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located.</p>
<dl class="section return"><dt>Returns</dt><dd>The primary monitor, or <code>NULL</code> if no monitors were found or if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>The primary monitor is always first in the array returned by <a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_monitors">Retrieving monitors</a> </dd>
<dd>
<a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga102f54e7acc9149edbcf0997152df8c9" name="ga102f54e7acc9149edbcf0997152df8c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga102f54e7acc9149edbcf0997152df8c9">&#9670;&#160;</a></span>glfwGetMonitorPos()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorPos </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>xpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>ypos</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.</p>
<p>Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0" name="ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">&#9670;&#160;</a></span>glfwGetMonitorWorkarea()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorWorkarea </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>xpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>ypos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the position, in screen coordinates, of the upper-left corner of the work area of the specified monitor along with the work area size in screen coordinates. The work area is defined as the area of the monitor not occluded by the window system task bar where present. If no task bar exists then the work area is the monitor resolution in screen coordinates.</p>
<p>Any or all of the position and size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position and size arguments will be set to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the monitor width, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the monitor height, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_workarea">Work area</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga7d8bffc6c55539286a6bd20d32a8d7ea" name="ga7d8bffc6c55539286a6bd20d32a8d7ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7d8bffc6c55539286a6bd20d32a8d7ea">&#9670;&#160;</a></span>glfwGetMonitorPhysicalSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorPhysicalSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>widthMM</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>heightMM</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the size, in millimetres, of the display area of the specified monitor.</p>
<p>Some platforms do not provide accurate monitor size information, either because the monitor <a href="https://en.wikipedia.org/wiki/Extended_display_identification_data">EDID</a> data is incorrect or because the driver does not report it accurately.</p>
<p>Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">widthMM</td><td>Where to store the width, in millimetres, of the monitor's display area, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">heightMM</td><td>Where to store the height, in millimetres, of the monitor's display area, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd><b>Windows:</b> On Windows 8 and earlier the physical size is calculated from the current resolution and system DPI instead of querying the monitor EDID data.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gad3152e84465fa620b601265ebfcdb21b" name="gad3152e84465fa620b601265ebfcdb21b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad3152e84465fa620b601265ebfcdb21b">&#9670;&#160;</a></span>glfwGetMonitorContentScale()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwGetMonitorContentScale </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float *&#160;</td>
<td class="paramname"><em>xscale</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float *&#160;</td>
<td class="paramname"><em>yscale</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function retrieves the content scale for the specified monitor. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>
<p>The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">xscale</td><td>Where to store the x-axis content scale, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">yscale</td><td>Where to store the y-axis content scale, or <code>NULL</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Fractional scaling information is not yet available for monitors, so this function only returns integer content scales.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_scale">Content scale</a> </dd>
<dd>
<a class="el" href="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">glfwGetWindowContentScale</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga7af83e13489d90379588fb331b9e4b68" name="ga7af83e13489d90379588fb331b9e4b68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7af83e13489d90379588fb331b9e4b68">&#9670;&#160;</a></span>glfwGetMonitorName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * glfwGetMonitorName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded name of the monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga702750e24313a686d3637297b6e85fda" name="ga702750e24313a686d3637297b6e85fda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga702750e24313a686d3637297b6e85fda">&#9670;&#160;</a></span>glfwSetMonitorUserPointer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetMonitorUserPointer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pointer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the user-defined pointer of the specified monitor. The current value is retained until the monitor is disconnected. The initial value is <code>NULL</code>.</p>
<p>This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose pointer to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pointer</td><td>The new value.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_userptr">User pointer</a> </dd>
<dd>
<a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga1adbfbfb8cd58b23cfee82e574fbbdc5" name="ga1adbfbfb8cd58b23cfee82e574fbbdc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1adbfbfb8cd58b23cfee82e574fbbdc5">&#9670;&#160;</a></span>glfwGetMonitorUserPointer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * glfwGetMonitorUserPointer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the current value of the user-defined pointer of the specified monitor. The initial value is <code>NULL</code>.</p>
<p>This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose pointer to return.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_userptr">User pointer</a> </dd>
<dd>
<a class="el" href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">glfwSetMonitorUserPointer</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="gab39df645587c8518192aa746c2fb06c3" name="gab39df645587c8518192aa746c2fb06c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab39df645587c8518192aa746c2fb06c3">&#9670;&#160;</a></span>glfwSetMonitorCallback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> glfwSetMonitorCallback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a>&#160;</td>
<td class="paramname"><em>callback</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
<dl class="section user"><dt>Callback signature</dt><dd><div class="fragment"><div class="line"><span class="keywordtype">void</span> function_name(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor, <span class="keywordtype">int</span> event)</div>
</div><!-- fragment --> For more information about the callback parameters, see the <a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">function pointer type</a>.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gad2e24d2843cb7d6c26202cddd530fc1b" name="gad2e24d2843cb7d6c26202cddd530fc1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2e24d2843cb7d6c26202cddd530fc1b">&#9670;&#160;</a></span>glfwGetVideoModes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> * glfwGetVideoModes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>count</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths), then by resolution area (the product of width and height), then resolution width and finally by refresh rate.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of video modes in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of video modes, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Changed to return an array of modes for a specific monitor. </dd></dl>
</div>
</div>
<a id="gaba376fa7e76634b4788bddc505d6c9d5" name="gaba376fa7e76634b4788bddc505d6c9d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaba376fa7e76634b4788bddc505d6c9d5">&#9670;&#160;</a></span>glfwGetVideoMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> * glfwGetVideoMode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current mode of the monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
<dd>
<a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetDesktopMode</code>. </dd></dl>
</div>
</div>
<a id="ga6ac582625c990220785ddd34efa3169a" name="ga6ac582625c990220785ddd34efa3169a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6ac582625c990220785ddd34efa3169a">&#9670;&#160;</a></span>glfwSetGamma()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetGamma </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>gamma</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function generates an appropriately sized gamma ramp from the specified exponent and then calls <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> with it. The value must be a finite number greater than zero.</p>
<p>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>
<p>For gamma correct rendering with OpenGL or OpenGL ES, see the <a class="el" href="window_guide.html#GLFW_SRGB_CAPABLE">GLFW_SRGB_CAPABLE</a> hint.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gamma</td><td>The desired exponent.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a> (see remarks).</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga76ba90debcf0062b5c4b73052b24f96f" name="ga76ba90debcf0062b5c4b73052b24f96f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76ba90debcf0062b5c4b73052b24f96f">&#9670;&#160;</a></span>glfwGetGammaRamp()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a> * glfwGetGammaRamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the current gamma ramp of the specified monitor.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current gamma ramp, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a> (see remarks).</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a> while returning <code>NULL</code>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga583f0ffd0d29613d8cd172b996bbf0dd" name="ga583f0ffd0d29613d8cd172b996bbf0dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga583f0ffd0d29613d8cd172b996bbf0dd">&#9670;&#160;</a></span>glfwSetGammaRamp()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetGammaRamp </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="struct_g_l_f_wgammaramp.html">GLFWgammaramp</a> *&#160;</td>
<td class="paramname"><em>ramp</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
<p>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>
<p>For gamma correct rendering with OpenGL or OpenGL ES, see the <a class="el" href="window_guide.html#GLFW_SRGB_CAPABLE">GLFW_SRGB_CAPABLE</a> hint.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ramp</td><td>The gamma ramp to use.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a> (see remarks).</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>The size of the specified gamma ramp should match the size of the current ramp for that monitor.</dd>
<dd>
<b>Windows:</b> The gamma ramp size must be 256.</dd>
<dd>
<b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#ga526fba20a01504a8086c763b6ca53ce5">GLFW_FEATURE_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified gamma ramp is copied before this function returns.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,837 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Native access</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">Native access</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p><b>By using the native access functions you assert that you know what you're doing and how to fix problems caused by using them. If you don't, you shouldn't be using them.</b></p>
<p>Before the inclusion of <a class="el" href="glfw3native_8h.html">glfw3native.h</a>, you may define zero or more window system API macro and zero or more context creation API macros.</p>
<p>The chosen backends must match those the library was compiled for. Failure to do this will cause a link-time error.</p>
<p>The available window API macros are:</p><ul>
<li><code>GLFW_EXPOSE_NATIVE_WIN32</code></li>
<li><code>GLFW_EXPOSE_NATIVE_COCOA</code></li>
<li><code>GLFW_EXPOSE_NATIVE_X11</code></li>
<li><code>GLFW_EXPOSE_NATIVE_WAYLAND</code></li>
</ul>
<p>The available context API macros are:</p><ul>
<li><code>GLFW_EXPOSE_NATIVE_WGL</code></li>
<li><code>GLFW_EXPOSE_NATIVE_NSGL</code></li>
<li><code>GLFW_EXPOSE_NATIVE_GLX</code></li>
<li><code>GLFW_EXPOSE_NATIVE_EGL</code></li>
<li><code>GLFW_EXPOSE_NATIVE_OSMESA</code></li>
</ul>
<p>These macros select which of the native access functions that are declared and which platform-specific headers to include. It is then up your (by definition platform-specific) code to handle which of these should be defined.</p>
<p>If you do not want the platform-specific headers to be included, define <code>GLFW_NATIVE_INCLUDE_NONE</code> before including the <a class="el" href="glfw3native_8h.html">glfw3native.h</a> header.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_EXPOSE_NATIVE_WIN32</span></div>
<div class="line"><span class="preprocessor">#define GLFW_EXPOSE_NATIVE_WGL</span></div>
<div class="line"><span class="preprocessor">#define GLFW_NATIVE_INCLUDE_NONE</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="glfw3native_8h.html">GLFW/glfw3native.h</a>&gt;</span></div>
<div class="ttc" id="aglfw3native_8h_html"><div class="ttname"><a href="glfw3native_8h.html">glfw3native.h</a></div><div class="ttdoc">The header of the native access functions.</div></div>
</div><!-- fragment --> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad4d3e9242536c0ba6be88a98f4c73a41" id="r_gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the adapter device name of the specified monitor. <br /></td></tr>
<tr class="separator:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac845f7dbe4c1d7fdd682a3c6fdae6766" id="r_gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the display device name of the specified monitor. <br /></td></tr>
<tr class="separator:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe5079aa79038b0079fc09d5f0a8e667" id="r_gafe5079aa79038b0079fc09d5f0a8e667"><td class="memItemLeft" align="right" valign="top">HWND&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gafe5079aa79038b0079fc09d5f0a8e667"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>HWND</code> of the specified window. <br /></td></tr>
<tr class="separator:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadc4010d91d9cc1134d040eeb1202a143" id="r_gadc4010d91d9cc1134d040eeb1202a143"><td class="memItemLeft" align="right" valign="top">HGLRC&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gadc4010d91d9cc1134d040eeb1202a143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>HGLRC</code> of the specified window. <br /></td></tr>
<tr class="separator:gadc4010d91d9cc1134d040eeb1202a143"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf22f429aec4b1aab316142d66d9be3e6" id="r_gaf22f429aec4b1aab316142d66d9be3e6"><td class="memItemLeft" align="right" valign="top">CGDirectDisplayID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gaf22f429aec4b1aab316142d66d9be3e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>CGDirectDisplayID</code> of the specified monitor. <br /></td></tr>
<tr class="separator:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3ed9d495d0c2bb9652de5a50c648715" id="r_gac3ed9d495d0c2bb9652de5a50c648715"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:gac3ed9d495d0c2bb9652de5a50c648715"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSWindow</code> of the specified window. <br /></td></tr>
<tr class="separator:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7274fb6595894e880fc95dc63156e9b1" id="r_ga7274fb6595894e880fc95dc63156e9b1"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga7274fb6595894e880fc95dc63156e9b1">glfwGetCocoaView</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga7274fb6595894e880fc95dc63156e9b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSView</code> of the specified window. <br /></td></tr>
<tr class="separator:ga7274fb6595894e880fc95dc63156e9b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga559e002e3cd63c979881770cd4dc63bc" id="r_ga559e002e3cd63c979881770cd4dc63bc"><td class="memItemLeft" align="right" valign="top">id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga559e002e3cd63c979881770cd4dc63bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>NSOpenGLContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga559e002e3cd63c979881770cd4dc63bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e7822385cc8a1cc3b18f60352830189" id="r_ga6e7822385cc8a1cc3b18f60352830189"><td class="memItemLeft" align="right" valign="top">Display *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a> (void)</td></tr>
<tr class="memdesc:ga6e7822385cc8a1cc3b18f60352830189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>Display</code> used by GLFW. <br /></td></tr>
<tr class="separator:ga6e7822385cc8a1cc3b18f60352830189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga088fbfa80f50569402b41be71ad66e40" id="r_ga088fbfa80f50569402b41be71ad66e40"><td class="memItemLeft" align="right" valign="top">RRCrtc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga088fbfa80f50569402b41be71ad66e40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>RRCrtc</code> of the specified monitor. <br /></td></tr>
<tr class="separator:ga088fbfa80f50569402b41be71ad66e40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c" id="r_gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memItemLeft" align="right" valign="top">RROutput&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>RROutput</code> of the specified monitor. <br /></td></tr>
<tr class="separator:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90ca676322740842db446999a1b1f21d" id="r_ga90ca676322740842db446999a1b1f21d"><td class="memItemLeft" align="right" valign="top">Window&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga90ca676322740842db446999a1b1f21d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>Window</code> of the specified window. <br /></td></tr>
<tr class="separator:ga90ca676322740842db446999a1b1f21d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55f879ab02d93367f966186b6f0133f7" id="r_ga55f879ab02d93367f966186b6f0133f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a> (const char *string)</td></tr>
<tr class="memdesc:ga55f879ab02d93367f966186b6f0133f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current primary selection to the specified string. <br /></td></tr>
<tr class="separator:ga55f879ab02d93367f966186b6f0133f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae084ef64dc0db140b455b1427256d3f7" id="r_gae084ef64dc0db140b455b1427256d3f7"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> (void)</td></tr>
<tr class="memdesc:gae084ef64dc0db140b455b1427256d3f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the contents of the current primary selection as a string. <br /></td></tr>
<tr class="separator:gae084ef64dc0db140b455b1427256d3f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62d884114b0abfcdc2930e89f20867e2" id="r_ga62d884114b0abfcdc2930e89f20867e2"><td class="memItemLeft" align="right" valign="top">GLXContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga62d884114b0abfcdc2930e89f20867e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>GLXContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga62d884114b0abfcdc2930e89f20867e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1ed27b8766e859a21381e8f8ce18d049" id="r_ga1ed27b8766e859a21381e8f8ce18d049"><td class="memItemLeft" align="right" valign="top">GLXWindow&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga1ed27b8766e859a21381e8f8ce18d049"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>GLXWindow</code> of the specified window. <br /></td></tr>
<tr class="separator:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacbe11f93ce20621de82989bbba94e62a" id="r_gacbe11f93ce20621de82989bbba94e62a"><td class="memItemLeft" align="right" valign="top">struct wl_display *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a> (void)</td></tr>
<tr class="memdesc:gacbe11f93ce20621de82989bbba94e62a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>struct wl_display*</code> used by GLFW. <br /></td></tr>
<tr class="separator:gacbe11f93ce20621de82989bbba94e62a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f16066bd4c59e2f99418adfcb43dd16" id="r_ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memItemLeft" align="right" valign="top">struct wl_output *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
<tr class="memdesc:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>struct wl_output*</code> of the specified monitor. <br /></td></tr>
<tr class="separator:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c597f2841229d9626f0811cca41ceb3" id="r_ga5c597f2841229d9626f0811cca41ceb3"><td class="memItemLeft" align="right" valign="top">struct wl_surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga5c597f2841229d9626f0811cca41ceb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the main <code>struct wl_surface*</code> of the specified window. <br /></td></tr>
<tr class="separator:ga5c597f2841229d9626f0811cca41ceb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1cd8d973f47aacb5532d368147cc3138" id="r_ga1cd8d973f47aacb5532d368147cc3138"><td class="memItemLeft" align="right" valign="top">EGLDisplay&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a> (void)</td></tr>
<tr class="memdesc:ga1cd8d973f47aacb5532d368147cc3138"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLDisplay</code> used by GLFW. <br /></td></tr>
<tr class="separator:ga1cd8d973f47aacb5532d368147cc3138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga671c5072becd085f4ab5771a9c8efcf1" id="r_ga671c5072becd085f4ab5771a9c8efcf1"><td class="memItemLeft" align="right" valign="top">EGLContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga671c5072becd085f4ab5771a9c8efcf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2199b36117a6a695fec8441d8052eee6" id="r_ga2199b36117a6a695fec8441d8052eee6"><td class="memItemLeft" align="right" valign="top">EGLSurface&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga2199b36117a6a695fec8441d8052eee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>EGLSurface</code> of the specified window. <br /></td></tr>
<tr class="separator:ga2199b36117a6a695fec8441d8052eee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b36e3e3dcf308b776427b6bd73cc132" id="r_ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>
<tr class="memdesc:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the color buffer associated with the specified window. <br /></td></tr>
<tr class="separator:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6b64039ffc88a7a2f57f0956c0c75d53" id="r_ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>
<tr class="memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the depth buffer associated with the specified window. <br /></td></tr>
<tr class="separator:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e47700080094eb569cb053afaa88773" id="r_ga9e47700080094eb569cb053afaa88773"><td class="memItemLeft" align="right" valign="top">OSMesaContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
<tr class="memdesc:ga9e47700080094eb569cb053afaa88773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code>OSMesaContext</code> of the specified window. <br /></td></tr>
<tr class="separator:ga9e47700080094eb569cb053afaa88773"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gad4d3e9242536c0ba6be88a98f4c73a41" name="gad4d3e9242536c0ba6be88a98f4c73a41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad4d3e9242536c0ba6be88a98f4c73a41">&#9670;&#160;</a></span>glfwGetWin32Adapter()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * glfwGetWin32Adapter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded adapter device name (for example <code>\\.\DISPLAY1</code>) of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
</div>
</div>
<a id="gac845f7dbe4c1d7fdd682a3c6fdae6766" name="gac845f7dbe4c1d7fdd682a3c6fdae6766"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac845f7dbe4c1d7fdd682a3c6fdae6766">&#9670;&#160;</a></span>glfwGetWin32Monitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * glfwGetWin32Monitor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded display device name (for example <code>\\.\DISPLAY1\Monitor0</code>) of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
</div>
</div>
<a id="gafe5079aa79038b0079fc09d5f0a8e667" name="gafe5079aa79038b0079fc09d5f0a8e667"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe5079aa79038b0079fc09d5f0a8e667">&#9670;&#160;</a></span>glfwGetWin32Window()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HWND glfwGetWin32Window </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>HWND</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>The <code>HDC</code> associated with the window can be queried with the <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc">GetDC</a> function. <div class="fragment"><div class="line">HDC dc = GetDC(<a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(window));</div>
<div class="ttc" id="agroup__native_html_gafe5079aa79038b0079fc09d5f0a8e667"><div class="ttname"><a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a></div><div class="ttdeci">HWND glfwGetWin32Window(GLFWwindow *window)</div><div class="ttdoc">Returns the HWND of the specified window.</div></div>
</div><!-- fragment --> This DC is private and does not need to be released.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gadc4010d91d9cc1134d040eeb1202a143" name="gadc4010d91d9cc1134d040eeb1202a143"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadc4010d91d9cc1134d040eeb1202a143">&#9670;&#160;</a></span>glfwGetWGLContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HGLRC glfwGetWGLContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>HGLRC</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>The <code>HDC</code> associated with the window can be queried with the <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc">GetDC</a> function. <div class="fragment"><div class="line">HDC dc = GetDC(<a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(window));</div>
</div><!-- fragment --> This DC is private and does not need to be released.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="gaf22f429aec4b1aab316142d66d9be3e6" name="gaf22f429aec4b1aab316142d66d9be3e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf22f429aec4b1aab316142d66d9be3e6">&#9670;&#160;</a></span>glfwGetCocoaMonitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">CGDirectDisplayID glfwGetCocoaMonitor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>CGDirectDisplayID</code> of the specified monitor, or <code>kCGNullDirectDisplay</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
</div>
</div>
<a id="gac3ed9d495d0c2bb9652de5a50c648715" name="gac3ed9d495d0c2bb9652de5a50c648715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3ed9d495d0c2bb9652de5a50c648715">&#9670;&#160;</a></span>glfwGetCocoaWindow()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">id glfwGetCocoaWindow </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>NSWindow</code> of the specified window, or <code>nil</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga7274fb6595894e880fc95dc63156e9b1" name="ga7274fb6595894e880fc95dc63156e9b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7274fb6595894e880fc95dc63156e9b1">&#9670;&#160;</a></span>glfwGetCocoaView()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">id glfwGetCocoaView </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>NSView</code> of the specified window, or <code>nil</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.4. </dd></dl>
</div>
</div>
<a id="ga559e002e3cd63c979881770cd4dc63bc" name="ga559e002e3cd63c979881770cd4dc63bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga559e002e3cd63c979881770cd4dc63bc">&#9670;&#160;</a></span>glfwGetNSGLContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">id glfwGetNSGLContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>NSOpenGLContext</code> of the specified window, or <code>nil</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga6e7822385cc8a1cc3b18f60352830189" name="ga6e7822385cc8a1cc3b18f60352830189"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6e7822385cc8a1cc3b18f60352830189">&#9670;&#160;</a></span>glfwGetX11Display()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Display * glfwGetX11Display </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>Display</code> used by GLFW, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga088fbfa80f50569402b41be71ad66e40" name="ga088fbfa80f50569402b41be71ad66e40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga088fbfa80f50569402b41be71ad66e40">&#9670;&#160;</a></span>glfwGetX11Adapter()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RRCrtc glfwGetX11Adapter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>RRCrtc</code> of the specified monitor, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
</div>
</div>
<a id="gab2f8cc043905e9fa9b12bfdbbcfe874c" name="gab2f8cc043905e9fa9b12bfdbbcfe874c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab2f8cc043905e9fa9b12bfdbbcfe874c">&#9670;&#160;</a></span>glfwGetX11Monitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">RROutput glfwGetX11Monitor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>RROutput</code> of the specified monitor, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
</div>
</div>
<a id="ga90ca676322740842db446999a1b1f21d" name="ga90ca676322740842db446999a1b1f21d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga90ca676322740842db446999a1b1f21d">&#9670;&#160;</a></span>glfwGetX11Window()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Window glfwGetX11Window </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>Window</code> of the specified window, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga55f879ab02d93367f966186b6f0133f7" name="ga55f879ab02d93367f966186b6f0133f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55f879ab02d93367f966186b6f0133f7">&#9670;&#160;</a></span>glfwSetX11SelectionString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void glfwSetX11SelectionString </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>string</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">string</td><td>A UTF-8 encoded string.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
<dd>
<a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7" title="Returns the contents of the current primary selection as a string.">glfwGetX11SelectionString</a> </dd>
<dd>
<a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd" title="Sets the clipboard to the specified string.">glfwSetClipboardString</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="gae084ef64dc0db140b455b1427256d3f7" name="gae084ef64dc0db140b455b1427256d3f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae084ef64dc0db140b455b1427256d3f7">&#9670;&#160;</a></span>glfwGetX11SelectionString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * glfwGetX11SelectionString </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If the selection is empty or if its contents cannot be converted, <code>NULL</code> is returned and a <a class="el" href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>
<dl class="section return"><dt>Returns</dt><dd>The contents of the selection as a UTF-8 encoded string, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> or <a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a>, or until the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
<dd>
<a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7" title="Sets the current primary selection to the specified string.">glfwSetX11SelectionString</a> </dd>
<dd>
<a class="el" href="group__input.html#ga71a5b20808ea92193d65c21b82580355" title="Returns the contents of the clipboard as a string.">glfwGetClipboardString</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga62d884114b0abfcdc2930e89f20867e2" name="ga62d884114b0abfcdc2930e89f20867e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga62d884114b0abfcdc2930e89f20867e2">&#9670;&#160;</a></span>glfwGetGLXContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GLXContext glfwGetGLXContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>GLXContext</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga1ed27b8766e859a21381e8f8ce18d049" name="ga1ed27b8766e859a21381e8f8ce18d049"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1ed27b8766e859a21381e8f8ce18d049">&#9670;&#160;</a></span>glfwGetGLXWindow()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GLXWindow glfwGetGLXWindow </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>GLXWindow</code> of the specified window, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="gacbe11f93ce20621de82989bbba94e62a" name="gacbe11f93ce20621de82989bbba94e62a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacbe11f93ce20621de82989bbba94e62a">&#9670;&#160;</a></span>glfwGetWaylandDisplay()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct wl_display * glfwGetWaylandDisplay </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>struct wl_display*</code> used by GLFW, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="ga4f16066bd4c59e2f99418adfcb43dd16" name="ga4f16066bd4c59e2f99418adfcb43dd16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f16066bd4c59e2f99418adfcb43dd16">&#9670;&#160;</a></span>glfwGetWaylandMonitor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct wl_output * glfwGetWaylandMonitor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *&#160;</td>
<td class="paramname"><em>monitor</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>struct wl_output*</code> of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="ga5c597f2841229d9626f0811cca41ceb3" name="ga5c597f2841229d9626f0811cca41ceb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5c597f2841229d9626f0811cca41ceb3">&#9670;&#160;</a></span>glfwGetWaylandWindow()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct wl_surface * glfwGetWaylandWindow </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The main <code>struct wl_surface*</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga3608c6c29ab7a72f3bf019f4c3a2563d">GLFW_PLATFORM_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="ga1cd8d973f47aacb5532d368147cc3138" name="ga1cd8d973f47aacb5532d368147cc3138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1cd8d973f47aacb5532d368147cc3138">&#9670;&#160;</a></span>glfwGetEGLDisplay()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EGLDisplay glfwGetEGLDisplay </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLDisplay</code> used by GLFW, or <code>EGL_NO_DISPLAY</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Because EGL is initialized on demand, this function will return <code>EGL_NO_DISPLAY</code> until the first context has been created via EGL.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga671c5072becd085f4ab5771a9c8efcf1" name="ga671c5072becd085f4ab5771a9c8efcf1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga671c5072becd085f4ab5771a9c8efcf1">&#9670;&#160;</a></span>glfwGetEGLContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EGLContext glfwGetEGLContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLContext</code> of the specified window, or <code>EGL_NO_CONTEXT</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga2199b36117a6a695fec8441d8052eee6" name="ga2199b36117a6a695fec8441d8052eee6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2199b36117a6a695fec8441d8052eee6">&#9670;&#160;</a></span>glfwGetEGLSurface()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EGLSurface glfwGetEGLSurface </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLSurface</code> of the specified window, or <code>EGL_NO_SURFACE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
</div>
</div>
<a id="ga3b36e3e3dcf308b776427b6bd73cc132" name="ga3b36e3e3dcf308b776427b6bd73cc132"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3b36e3e3dcf308b776427b6bd73cc132">&#9670;&#160;</a></span>glfwGetOSMesaColorBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glfwGetOSMesaColorBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>format</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>buffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose color buffer to retrieve. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the width of the color buffer, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the height of the color buffer, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">format</td><td>Where to store the OSMesa pixel format of the color buffer, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>Where to store the address of the color buffer, or <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga6b64039ffc88a7a2f57f0956c0c75d53" name="ga6b64039ffc88a7a2f57f0956c0c75d53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6b64039ffc88a7a2f57f0956c0c75d53">&#9670;&#160;</a></span>glfwGetOSMesaDepthBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glfwGetOSMesaDepthBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>bytesPerValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>buffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose depth buffer to retrieve. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the width of the depth buffer, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the height of the depth buffer, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">bytesPerValue</td><td>Where to store the number of bytes per depth buffer element, or <code>NULL</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>Where to store the address of the depth buffer, or <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
<a id="ga9e47700080094eb569cb053afaa88773" name="ga9e47700080094eb569cb053afaa88773"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9e47700080094eb569cb053afaa88773">&#9670;&#160;</a></span>glfwGetOSMesaContext()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">OSMesaContext glfwGetOSMesaContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The <code>OSMesaContext</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,337 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Standard cursor shapes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">Standard cursor shapes<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>These are the <a class="el" href="input_guide.html#cursor_standard">standard cursor shapes</a> that can be requested from the platform (window system). </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga8ab0e717245b85506cb0eaefdea39d0a" id="r_ga8ab0e717245b85506cb0eaefdea39d0a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a">GLFW_ARROW_CURSOR</a>&#160;&#160;&#160;0x00036001</td></tr>
<tr class="memdesc:ga8ab0e717245b85506cb0eaefdea39d0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The regular arrow cursor shape. <br /></td></tr>
<tr class="separator:ga8ab0e717245b85506cb0eaefdea39d0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36185f4375eaada1b04e431244774c86" id="r_ga36185f4375eaada1b04e431244774c86"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga36185f4375eaada1b04e431244774c86">GLFW_IBEAM_CURSOR</a>&#160;&#160;&#160;0x00036002</td></tr>
<tr class="memdesc:ga36185f4375eaada1b04e431244774c86"><td class="mdescLeft">&#160;</td><td class="mdescRight">The text input I-beam cursor shape. <br /></td></tr>
<tr class="separator:ga36185f4375eaada1b04e431244774c86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8af88c0ea05ab9e8f9ac1530e8873c22" id="r_ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22">GLFW_CROSSHAIR_CURSOR</a>&#160;&#160;&#160;0x00036003</td></tr>
<tr class="memdesc:ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="mdescLeft">&#160;</td><td class="mdescRight">The crosshair cursor shape. <br /></td></tr>
<tr class="separator:ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad01a50929fb515bf27e4462c51f6ed0" id="r_gaad01a50929fb515bf27e4462c51f6ed0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gaad01a50929fb515bf27e4462c51f6ed0">GLFW_POINTING_HAND_CURSOR</a>&#160;&#160;&#160;0x00036004</td></tr>
<tr class="memdesc:gaad01a50929fb515bf27e4462c51f6ed0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The pointing hand cursor shape. <br /></td></tr>
<tr class="separator:gaad01a50929fb515bf27e4462c51f6ed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2010a43dc1050a7c9154148a63cf01ad" id="r_ga2010a43dc1050a7c9154148a63cf01ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga2010a43dc1050a7c9154148a63cf01ad">GLFW_RESIZE_EW_CURSOR</a>&#160;&#160;&#160;0x00036005</td></tr>
<tr class="memdesc:ga2010a43dc1050a7c9154148a63cf01ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">The horizontal resize/move arrow shape. <br /></td></tr>
<tr class="separator:ga2010a43dc1050a7c9154148a63cf01ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa59214e8cdc8c8adf08fdf125ed68388" id="r_gaa59214e8cdc8c8adf08fdf125ed68388"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gaa59214e8cdc8c8adf08fdf125ed68388">GLFW_RESIZE_NS_CURSOR</a>&#160;&#160;&#160;0x00036006</td></tr>
<tr class="memdesc:gaa59214e8cdc8c8adf08fdf125ed68388"><td class="mdescLeft">&#160;</td><td class="mdescRight">The vertical resize/move arrow shape. <br /></td></tr>
<tr class="separator:gaa59214e8cdc8c8adf08fdf125ed68388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf2c0a495ec9cef4e1a364cc99aa78da" id="r_gadf2c0a495ec9cef4e1a364cc99aa78da"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gadf2c0a495ec9cef4e1a364cc99aa78da">GLFW_RESIZE_NWSE_CURSOR</a>&#160;&#160;&#160;0x00036007</td></tr>
<tr class="memdesc:gadf2c0a495ec9cef4e1a364cc99aa78da"><td class="mdescLeft">&#160;</td><td class="mdescRight">The top-left to bottom-right diagonal resize/move arrow shape. <br /></td></tr>
<tr class="separator:gadf2c0a495ec9cef4e1a364cc99aa78da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab06bba3b407f92807ba9b48de667a323" id="r_gab06bba3b407f92807ba9b48de667a323"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gab06bba3b407f92807ba9b48de667a323">GLFW_RESIZE_NESW_CURSOR</a>&#160;&#160;&#160;0x00036008</td></tr>
<tr class="memdesc:gab06bba3b407f92807ba9b48de667a323"><td class="mdescLeft">&#160;</td><td class="mdescRight">The top-right to bottom-left diagonal resize/move arrow shape. <br /></td></tr>
<tr class="separator:gab06bba3b407f92807ba9b48de667a323"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3a5f4811155f95ccafbbb4c9a899fc1d" id="r_ga3a5f4811155f95ccafbbb4c9a899fc1d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga3a5f4811155f95ccafbbb4c9a899fc1d">GLFW_RESIZE_ALL_CURSOR</a>&#160;&#160;&#160;0x00036009</td></tr>
<tr class="memdesc:ga3a5f4811155f95ccafbbb4c9a899fc1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The omni-directional resize/move cursor shape. <br /></td></tr>
<tr class="separator:ga3a5f4811155f95ccafbbb4c9a899fc1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga297c503095b034bc8891393b637844b1" id="r_ga297c503095b034bc8891393b637844b1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga297c503095b034bc8891393b637844b1">GLFW_NOT_ALLOWED_CURSOR</a>&#160;&#160;&#160;0x0003600A</td></tr>
<tr class="memdesc:ga297c503095b034bc8891393b637844b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The operation-not-allowed shape. <br /></td></tr>
<tr class="separator:ga297c503095b034bc8891393b637844b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb3eb0109f11bb808fc34659177ca962" id="r_gabb3eb0109f11bb808fc34659177ca962"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gabb3eb0109f11bb808fc34659177ca962">GLFW_HRESIZE_CURSOR</a>&#160;&#160;&#160;<a class="el" href="group__shapes.html#ga2010a43dc1050a7c9154148a63cf01ad">GLFW_RESIZE_EW_CURSOR</a></td></tr>
<tr class="memdesc:gabb3eb0109f11bb808fc34659177ca962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Legacy name for compatibility. <br /></td></tr>
<tr class="separator:gabb3eb0109f11bb808fc34659177ca962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf024f0e1ff8366fb2b5c260509a1fce5" id="r_gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5">GLFW_VRESIZE_CURSOR</a>&#160;&#160;&#160;<a class="el" href="group__shapes.html#gaa59214e8cdc8c8adf08fdf125ed68388">GLFW_RESIZE_NS_CURSOR</a></td></tr>
<tr class="memdesc:gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Legacy name for compatibility. <br /></td></tr>
<tr class="separator:gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1db35e20849e0837c82e3dc1fd797263" id="r_ga1db35e20849e0837c82e3dc1fd797263"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263">GLFW_HAND_CURSOR</a>&#160;&#160;&#160;<a class="el" href="group__shapes.html#gaad01a50929fb515bf27e4462c51f6ed0">GLFW_POINTING_HAND_CURSOR</a></td></tr>
<tr class="memdesc:ga1db35e20849e0837c82e3dc1fd797263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Legacy name for compatibility. <br /></td></tr>
<tr class="separator:ga1db35e20849e0837c82e3dc1fd797263"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga8ab0e717245b85506cb0eaefdea39d0a" name="ga8ab0e717245b85506cb0eaefdea39d0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ab0e717245b85506cb0eaefdea39d0a">&#9670;&#160;</a></span>GLFW_ARROW_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_ARROW_CURSOR&#160;&#160;&#160;0x00036001</td>
</tr>
</table>
</div><div class="memdoc">
<p>The regular arrow cursor shape. </p>
</div>
</div>
<a id="ga36185f4375eaada1b04e431244774c86" name="ga36185f4375eaada1b04e431244774c86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga36185f4375eaada1b04e431244774c86">&#9670;&#160;</a></span>GLFW_IBEAM_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_IBEAM_CURSOR&#160;&#160;&#160;0x00036002</td>
</tr>
</table>
</div><div class="memdoc">
<p>The text input I-beam cursor shape. </p>
</div>
</div>
<a id="ga8af88c0ea05ab9e8f9ac1530e8873c22" name="ga8af88c0ea05ab9e8f9ac1530e8873c22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8af88c0ea05ab9e8f9ac1530e8873c22">&#9670;&#160;</a></span>GLFW_CROSSHAIR_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_CROSSHAIR_CURSOR&#160;&#160;&#160;0x00036003</td>
</tr>
</table>
</div><div class="memdoc">
<p>The crosshair cursor shape. </p>
</div>
</div>
<a id="gaad01a50929fb515bf27e4462c51f6ed0" name="gaad01a50929fb515bf27e4462c51f6ed0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaad01a50929fb515bf27e4462c51f6ed0">&#9670;&#160;</a></span>GLFW_POINTING_HAND_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_POINTING_HAND_CURSOR&#160;&#160;&#160;0x00036004</td>
</tr>
</table>
</div><div class="memdoc">
<p>The pointing hand cursor shape. </p>
</div>
</div>
<a id="ga2010a43dc1050a7c9154148a63cf01ad" name="ga2010a43dc1050a7c9154148a63cf01ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2010a43dc1050a7c9154148a63cf01ad">&#9670;&#160;</a></span>GLFW_RESIZE_EW_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_RESIZE_EW_CURSOR&#160;&#160;&#160;0x00036005</td>
</tr>
</table>
</div><div class="memdoc">
<p>The horizontal resize/move arrow shape. This is usually a horizontal double-headed arrow. </p>
</div>
</div>
<a id="gaa59214e8cdc8c8adf08fdf125ed68388" name="gaa59214e8cdc8c8adf08fdf125ed68388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa59214e8cdc8c8adf08fdf125ed68388">&#9670;&#160;</a></span>GLFW_RESIZE_NS_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_RESIZE_NS_CURSOR&#160;&#160;&#160;0x00036006</td>
</tr>
</table>
</div><div class="memdoc">
<p>The vertical resize/move shape. This is usually a vertical double-headed arrow. </p>
</div>
</div>
<a id="gadf2c0a495ec9cef4e1a364cc99aa78da" name="gadf2c0a495ec9cef4e1a364cc99aa78da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf2c0a495ec9cef4e1a364cc99aa78da">&#9670;&#160;</a></span>GLFW_RESIZE_NWSE_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_RESIZE_NWSE_CURSOR&#160;&#160;&#160;0x00036007</td>
</tr>
</table>
</div><div class="memdoc">
<p>The top-left to bottom-right diagonal resize/move shape. This is usually a diagonal double-headed arrow.</p>
<dl class="section note"><dt>Note</dt><dd><b>macOS:</b> This shape is provided by a private system API and may fail with <a class="el" href="group__errors.html#ga09d6943923a70ddef3a085f5baee786c">GLFW_CURSOR_UNAVAILABLE</a> in the future.</dd>
<dd>
<b>Wayland:</b> This shape is provided by a newer standard not supported by all cursor themes.</dd>
<dd>
<b>X11:</b> This shape is provided by a newer standard not supported by all cursor themes. </dd></dl>
</div>
</div>
<a id="gab06bba3b407f92807ba9b48de667a323" name="gab06bba3b407f92807ba9b48de667a323"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab06bba3b407f92807ba9b48de667a323">&#9670;&#160;</a></span>GLFW_RESIZE_NESW_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_RESIZE_NESW_CURSOR&#160;&#160;&#160;0x00036008</td>
</tr>
</table>
</div><div class="memdoc">
<p>The top-right to bottom-left diagonal resize/move shape. This is usually a diagonal double-headed arrow.</p>
<dl class="section note"><dt>Note</dt><dd><b>macOS:</b> This shape is provided by a private system API and may fail with <a class="el" href="group__errors.html#ga09d6943923a70ddef3a085f5baee786c">GLFW_CURSOR_UNAVAILABLE</a> in the future.</dd>
<dd>
<b>Wayland:</b> This shape is provided by a newer standard not supported by all cursor themes.</dd>
<dd>
<b>X11:</b> This shape is provided by a newer standard not supported by all cursor themes. </dd></dl>
</div>
</div>
<a id="ga3a5f4811155f95ccafbbb4c9a899fc1d" name="ga3a5f4811155f95ccafbbb4c9a899fc1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3a5f4811155f95ccafbbb4c9a899fc1d">&#9670;&#160;</a></span>GLFW_RESIZE_ALL_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_RESIZE_ALL_CURSOR&#160;&#160;&#160;0x00036009</td>
</tr>
</table>
</div><div class="memdoc">
<p>The omni-directional resize cursor/move shape. This is usually either a combined horizontal and vertical double-headed arrow or a grabbing hand. </p>
</div>
</div>
<a id="ga297c503095b034bc8891393b637844b1" name="ga297c503095b034bc8891393b637844b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga297c503095b034bc8891393b637844b1">&#9670;&#160;</a></span>GLFW_NOT_ALLOWED_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_NOT_ALLOWED_CURSOR&#160;&#160;&#160;0x0003600A</td>
</tr>
</table>
</div><div class="memdoc">
<p>The operation-not-allowed shape. This is usually a circle with a diagonal line through it.</p>
<dl class="section note"><dt>Note</dt><dd><b>Wayland:</b> This shape is provided by a newer standard not supported by all cursor themes.</dd>
<dd>
<b>X11:</b> This shape is provided by a newer standard not supported by all cursor themes. </dd></dl>
</div>
</div>
<a id="gabb3eb0109f11bb808fc34659177ca962" name="gabb3eb0109f11bb808fc34659177ca962"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabb3eb0109f11bb808fc34659177ca962">&#9670;&#160;</a></span>GLFW_HRESIZE_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HRESIZE_CURSOR&#160;&#160;&#160;<a class="el" href="group__shapes.html#ga2010a43dc1050a7c9154148a63cf01ad">GLFW_RESIZE_EW_CURSOR</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is an alias for compatibility with earlier versions. </p>
</div>
</div>
<a id="gaf024f0e1ff8366fb2b5c260509a1fce5" name="gaf024f0e1ff8366fb2b5c260509a1fce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf024f0e1ff8366fb2b5c260509a1fce5">&#9670;&#160;</a></span>GLFW_VRESIZE_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_VRESIZE_CURSOR&#160;&#160;&#160;<a class="el" href="group__shapes.html#gaa59214e8cdc8c8adf08fdf125ed68388">GLFW_RESIZE_NS_CURSOR</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is an alias for compatibility with earlier versions. </p>
</div>
</div>
<a id="ga1db35e20849e0837c82e3dc1fd797263" name="ga1db35e20849e0837c82e3dc1fd797263"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1db35e20849e0837c82e3dc1fd797263">&#9670;&#160;</a></span>GLFW_HAND_CURSOR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define GLFW_HAND_CURSOR&#160;&#160;&#160;<a class="el" href="group__shapes.html#gaad01a50929fb515bf27e4462c51f6ed0">GLFW_POINTING_HAND_CURSOR</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>This is an alias for compatibility with earlier versions. </p>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

View File

@ -0,0 +1,361 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<title>GLFW: Vulkan support reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<div class="glfwheader">
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
<ul class="glfwnavbar">
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
<li><a href="https://www.glfw.org/download.html">Download</a></li>
<li><a href="https://www.glfw.org/community.html">Community</a></li>
</ul>
</div>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">Vulkan support reference</div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>This is the reference documentation for Vulkan related functions and types. For more task-oriented information, see the <a class="el" href="vulkan_guide.html">Vulkan guide</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga70c01918dc9d233a4fbe0681a43018af" id="r_ga70c01918dc9d233a4fbe0681a43018af"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a>) (void)</td></tr>
<tr class="memdesc:ga70c01918dc9d233a4fbe0681a43018af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan API function pointer type. <br /></td></tr>
<tr class="separator:ga70c01918dc9d233a4fbe0681a43018af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga2e7f30931e02464b5bc8d0d4b6f9fe2b" id="r_ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> (void)</td></tr>
<tr class="memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the Vulkan loader and an ICD have been found. <br /></td></tr>
<tr class="separator:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99ad342d82f4a3421e2864978cb6d1d6" id="r_ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> (uint32_t *count)</td></tr>
<tr class="memdesc:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Vulkan instance extensions required by GLFW. <br /></td></tr>
<tr class="separator:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf228fac94c5fd8f12423ec9af9ff1e9" id="r_gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a> (VkInstance instance, const char *procname)</td></tr>
<tr class="memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the specified Vulkan instance function. <br /></td></tr>
<tr class="separator:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaff3823355cdd7e2f3f9f4d9ea9518d92" id="r_gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> (VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</td></tr>
<tr class="memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the specified queue family can present images. <br /></td></tr>
<tr class="separator:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a24536bec3f80b08ead18e28e6ae965" id="r_ga1a24536bec3f80b08ead18e28e6ae965"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a> (VkInstance instance, <a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</td></tr>
<tr class="memdesc:ga1a24536bec3f80b08ead18e28e6ae965"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a Vulkan surface for the specified window. <br /></td></tr>
<tr class="separator:ga1a24536bec3f80b08ead18e28e6ae965"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga70c01918dc9d233a4fbe0681a43018af" name="ga70c01918dc9d233a4fbe0681a43018af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga70c01918dc9d233a4fbe0681a43018af">&#9670;&#160;</a></span>GLFWvkproc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* GLFWvkproc) (void)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic function pointer used for returning Vulkan API function pointers without forcing a cast from a regular pointer.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a> </dd>
<dd>
<a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga2e7f30931e02464b5bc8d0d4b6f9fe2b" name="ga2e7f30931e02464b5bc8d0d4b6f9fe2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">&#9670;&#160;</a></span>glfwVulkanSupported()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glfwVulkanSupported </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns whether the Vulkan loader and any minimally functional ICD have been found.</p>
<p>The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation or even instance creation is possible. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check whether the extensions necessary for Vulkan surface creation are available and <a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> to check whether a queue family of a physical device supports image presentation.</p>
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if Vulkan is minimally available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_support">Querying for Vulkan support</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="ga99ad342d82f4a3421e2864978cb6d1d6" name="ga99ad342d82f4a3421e2864978cb6d1d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99ad342d82f4a3421e2864978cb6d1d6">&#9670;&#160;</a></span>glfwGetRequiredInstanceExtensions()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char ** glfwGetRequiredInstanceExtensions </td>
<td>(</td>
<td class="paramtype">uint32_t *&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always contain <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>
<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
<p>If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns <code>NULL</code>. You may still use Vulkan for off-screen rendering and compute work.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of extensions in the returned array. This is set to zero if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of ASCII encoded extension names, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_ext">Querying required Vulkan extensions</a> </dd>
<dd>
<a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="gadf228fac94c5fd8f12423ec9af9ff1e9" name="gadf228fac94c5fd8f12423ec9af9ff1e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf228fac94c5fd8f12423ec9af9ff1e9">&#9670;&#160;</a></span>glfwGetInstanceProcAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a> glfwGetInstanceProcAddress </td>
<td>(</td>
<td class="paramtype">VkInstance&#160;</td>
<td class="paramname"><em>instance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>procname</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to <code>NULL</code> it can return any function exported from the Vulkan loader, including at least the following functions:</p>
<ul>
<li><code>vkEnumerateInstanceExtensionProperties</code></li>
<li><code>vkEnumerateInstanceLayerProperties</code></li>
<li><code>vkCreateInstance</code></li>
<li><code>vkGetInstanceProcAddr</code></li>
</ul>
<p>If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
<p>This function is equivalent to calling <code>vkGetInstanceProcAddr</code> with a platform-specific query of the Vulkan loader as a fallback.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to query, or <code>NULL</code> to retrieve functions related to instance creation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the library is terminated.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="gaff3823355cdd7e2f3f9f4d9ea9518d92" name="gaff3823355cdd7e2f3f9f4d9ea9518d92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaff3823355cdd7e2f3f9f4d9ea9518d92">&#9670;&#160;</a></span>glfwGetPhysicalDevicePresentationSupport()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int glfwGetPhysicalDevicePresentationSupport </td>
<td>(</td>
<td class="paramtype">VkInstance&#160;</td>
<td class="paramname"><em>instance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkPhysicalDevice&#160;</td>
<td class="paramname"><em>device</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>queuefamily</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.</p>
<p>If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created with the required extensions, this function returns <code>GLFW_FALSE</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance that the physical device belongs to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>The physical device that the queue family belongs to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">queuefamily</td><td>The index of the queue family to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the queue family supports presentation, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd><b>macOS:</b> This function currently always returns <code>GLFW_TRUE</code>, as the <code>VK_MVK_macos_surface</code> and <code>VK_EXT_metal_surface</code> extensions do not provide a <code>vkGetPhysicalDevice*PresentationSupport</code> type function.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_present">Querying for Vulkan presentation support</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
<a id="ga1a24536bec3f80b08ead18e28e6ae965" name="ga1a24536bec3f80b08ead18e28e6ae965"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1a24536bec3f80b08ead18e28e6ae965">&#9670;&#160;</a></span>glfwCreateWindowSurface()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkResult glfwCreateWindowSurface </td>
<td>(</td>
<td class="paramtype">VkInstance&#160;</td>
<td class="paramname"><em>instance</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
<td class="paramname"><em>window</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const VkAllocationCallbacks *&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkSurfaceKHR *&#160;</td>
<td class="paramname"><em>surface</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>This function creates a Vulkan surface for the specified window.</p>
<p>If the Vulkan loader or at least one minimally functional ICD were not found, this function returns <code>VK_ERROR_INITIALIZATION_FAILED</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
<p>If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions enabled, this function returns <code>VK_ERROR_EXTENSION_NOT_PRESENT</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
<p>The window surface cannot be shared with another API so the window must have been created with the <a class="el" href="window_guide.html#GLFW_CLIENT_API_attrib">client api hint</a> set to <code>GLFW_NO_API</code> otherwise it generates a <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> error and returns <code>VK_ERROR_NATIVE_WINDOW_IN_USE_KHR</code>.</p>
<p>The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> to destroy the surface.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to create the surface in. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to create the surface for. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator to use, or <code>NULL</code> to use the default allocator. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">surface</td><td>Where to store the handle of the surface. This is set to <code>VK_NULL_HANDLE</code> if an error occurred. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>VK_SUCCESS</code> if successful, or a Vulkan error code if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a></dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> should eliminate almost all occurrences of these errors.</dd>
<dd>
<b>macOS:</b> GLFW prefers the <code>VK_EXT_metal_surface</code> extension, with the <code>VK_MVK_macos_surface</code> extension as a fallback. The name of the selected extension, if any, is included in the array returned by <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a>.</dd>
<dd>
<b>macOS:</b> This function creates and sets a <code>CAMetalLayer</code> instance for the window content view, which is required for MoltenVK to function.</dd>
<dd>
<b>X11:</b> By default GLFW prefers the <code>VK_KHR_xcb_surface</code> extension, with the <code>VK_KHR_xlib_surface</code> extension as a fallback. You can make <code>VK_KHR_xlib_surface</code> the preferred extension by setting the <a class="el" href="intro_guide.html#GLFW_X11_XCB_VULKAN_SURFACE_hint">GLFW_X11_XCB_VULKAN_SURFACE</a> init hint. The name of the selected extension, if any, is included in the array returned by <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a>.</dd></dl>
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_surface">Creating a Vulkan window surface</a> </dd>
<dd>
<a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<p>
Last update on Fri Feb 23 2024 for GLFW 3.4.0
</p>
</address>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More