From 8d6f265441959d0eff2d3fd97edfb99b98ce2777 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 20 Oct 2016 00:50:54 +0200 Subject: [PATCH] Update default name from OS X to macOS Note that earlier releases are still referred to by their proper names; OS X or Mac OS X . --- README.md | 2 +- docs/Doxyfile.in | 2 +- docs/build.dox | 16 ++++++++-------- docs/compat.dox | 4 ++-- docs/compile.dox | 11 ++++++----- docs/context.dox | 2 +- docs/news.dox | 11 ++++++----- docs/quick.dox | 2 +- docs/window.dox | 2 +- include/GLFW/glfw3.h | 22 +++++++++++----------- src/cocoa_init.m | 2 +- src/cocoa_monitor.m | 2 +- src/cocoa_platform.h | 2 +- src/cocoa_time.c | 2 +- src/cocoa_window.m | 6 +++--- src/nsgl_context.h | 2 +- src/nsgl_context.m | 16 ++++++++-------- src/win32_window.c | 2 +- 18 files changed, 55 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 30e07efe..a1789595 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ does not need the headers for any context creation API (WGL, GLX, EGL, NSGL) or rendering API (OpenGL, OpenGL ES, Vulkan) to enable support for them. GLFW supports compilation on Windows with Visual C++ 2010 and later, MinGW and -MinGW-w64, on OS X with Clang and on Linux and other Unix-like systems with GCC +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. diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 062ac53c..6dd8dbe4 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -204,7 +204,7 @@ ALIASES = "thread_safety=@par Thread safety\n" \ "x11=__X11:__" \ "wayland=__Wayland:__" \ "win32=__Windows:__" \ - "osx=__OS X:__" + "macos=__macOS:__" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding diff --git a/docs/build.dox b/docs/build.dox index 20352b4b..05c08614 100644 --- a/docs/build.dox +++ b/docs/build.dox @@ -65,7 +65,7 @@ The following macros control which OpenGL or OpenGL ES API header is included. Only one of these may be defined at a time. `GLFW_INCLUDE_GLCOREARB` makes the GLFW header include the modern -`GL/glcorearb.h` header (`OpenGL/gl3.h` on OS X) instead of the regular OpenGL +`GL/glcorearb.h` header (`OpenGL/gl3.h` on macOS) instead of the regular OpenGL header. `GLFW_INCLUDE_ES1` makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h` @@ -84,7 +84,7 @@ header instead of the regular OpenGL header. 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 OS X) is included. +header (`OpenGL/gl.h` on macOS) is included. 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 @@ -119,7 +119,7 @@ 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 OS X, the list of system libraries is static and can be +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. @@ -289,7 +289,7 @@ env PKG_CONFIG_PATH=path/to/glfw/src cc `pkg-config --cflags glfw3` -o myprog my @endcode The dependencies do not include OpenGL or GLU, as GLFW loads any OpenGL, OpenGL -ES or Vulkan libraries it needs at runtime and does not use GLU. On OS X, GLU +ES or Vulkan libraries it needs at runtime and does not use GLU. On macOS, GLU is built into the OpenGL framework, so if you need GLU you don't need to do anything extra. If you need GLU and are using Linux or BSD, you should add the `glu` pkg-config package. @@ -309,7 +309,7 @@ cc `pkg-config --cflags glfw3 glu` -o myprog myprog.c `pkg-config --static --lib @endcode -@subsection build_link_xcode With Xcode on OS X +@subsection build_link_xcode With Xcode on macOS If you are using the dynamic library version of GLFW, simply add it to the project dependencies. @@ -319,10 +319,10 @@ OpenGL, IOKit and CoreVideo frameworks to the project as dependencies. They can all be found in `/System/Library/Frameworks`. -@subsection build_link_osx With command-line on OS X +@subsection build_link_osx With command-line on macOS It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when -building from the command line on OS X. That way you will get any new +building 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. @@ -342,6 +342,6 @@ against it from the command-line. The OpenGL framework contains both the OpenGL and GLU APIs, so there is nothing special to do when using GLU. Also note that even though your machine may have `libGL`-style OpenGL libraries, they are for use with the X Window System and -will _not_ work with the OS X native version of GLFW. +will _not_ work with the macOS native version of GLFW. */ diff --git a/docs/compat.dox b/docs/compat.dox index 175036b9..624dc3b1 100644 --- a/docs/compat.dox +++ b/docs/compat.dox @@ -160,7 +160,7 @@ extensions to provide support for sRGB framebuffers. Where both of these extension are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect. -@section compat_osx OpenGL 3.2 and later on OS X +@section compat_osx OpenGL 3.2 and later on macOS 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 @@ -217,7 +217,7 @@ surfaces on Mir. If any of these extensions are not available, @ref glfwGetRequiredInstanceExtensions will return an empty list and window surface creation will fail. -GLFW does not support any extensions for window surface creation on OS X, +GLFW does not support any extensions for window surface creation on macOS, meaning@ref glfwGetRequiredInstanceExtensions will return an empty list and window surface creation will fail. diff --git a/docs/compile.dox b/docs/compile.dox index c77a26c0..002b26bf 100644 --- a/docs/compile.dox +++ b/docs/compile.dox @@ -14,7 +14,8 @@ GLFW uses [CMake](http://www.cmake.org/) to generate project files or makefiles for a particular development environment. If you are on a Unix-like system such as Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or Homebrew, you can simply install its CMake package. If not, you can download -installers for Windows and OS X from the [CMake website](http://www.cmake.org/). +installers for Windows and macOS from the +[CMake website](http://www.cmake.org/). @note CMake only generates project files or makefiles. It does not compile the actual GLFW library. To compile GLFW, first generate these files for your @@ -76,11 +77,11 @@ the CMake wiki. Once you have this set up, move on to @ref compile_generate. -@subsubsection compile_deps_xcode Dependencies for Xcode on OS X +@subsubsection compile_deps_xcode Dependencies for Xcode on macOS Xcode comes with all necessary tools except for CMake. The required headers -and libraries are included in the core OS X frameworks. Xcode can be downloaded -from the Mac App Store or from the ADC Member Center. +and libraries are included in the core macOS frameworks. Xcode can be +downloaded from the Mac App Store or from the ADC Member Center. Once you have Xcode installed, move on to @ref compile_generate. @@ -201,7 +202,7 @@ the library. statically into the application. -@subsubsection compile_options_osx OS X specific CMake options +@subsubsection compile_options_osx macOS specific CMake options `GLFW_USE_CHDIR` determines whether `glfwInit` changes the current directory of bundled applications to the `Contents/Resources` directory. diff --git a/docs/context.dox b/docs/context.dox index ad3b1848..3f972828 100644 --- a/docs/context.dox +++ b/docs/context.dox @@ -84,7 +84,7 @@ 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. -__OS X:__ The first time a window is created the menu bar is populated with +@macos The first time a window is created the menu bar is populated with common commands like Hide, Quit and About. This is not desirable for example when writing a command-line only application. The menu bar setup can be disabled with a [compile-time option](@ref compile_options_osx). diff --git a/docs/news.dox b/docs/news.dox index 1e92eb4f..33019157 100644 --- a/docs/news.dox +++ b/docs/news.dox @@ -293,11 +293,12 @@ through CMake options. @subsection news_30_hidpi High-DPI support -GLFW now supports high-DPI monitors on both Windows and OS X, giving windows full -resolution framebuffers where other UI elements are scaled up. To achieve this, -@ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have been -added. These work with pixels, while the rest of the GLFW API works with screen -coordinates. This is important as OpenGL uses pixels, not screen coordinates. +GLFW now supports high-DPI monitors on both Windows and macOS, giving windows +full resolution framebuffers where other UI elements are scaled up. To achieve +this, @ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have +been added. These work with pixels, while the rest of the GLFW API works with +screen coordinates. This is important as OpenGL uses pixels, not screen +coordinates. @subsection news_30_error Error callback diff --git a/docs/quick.dox b/docs/quick.dox index dccc834d..dc1a2f8d 100644 --- a/docs/quick.dox +++ b/docs/quick.dox @@ -340,7 +340,7 @@ The program above can be found in the [source package](http://www.glfw.org/download.html) as `examples/simple.c` and is compiled along with all other examples when you build GLFW. If you built GLFW from the source package then already have this as `simple.exe` on -Windows, `simple` on Linux or `simple.app` on OS X. +Windows, `simple` on Linux or `simple.app` on macOS. This tutorial used only a few of the many functions GLFW provides. There are guides for each of the areas covered by GLFW. Each guide will introduce all the diff --git a/docs/window.dox b/docs/window.dox index 1ad09742..d725106a 100644 --- a/docs/window.dox +++ b/docs/window.dox @@ -258,7 +258,7 @@ create the context. Possible values are `GLFW_NATIVE_CONTEXT_API` and requested, this hint is ignored. @par -__OS X:__ The EGL API is not available on this platform and requests to use it +@macos The EGL API is not available on this platform and requests to use it will fail. @par diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index ebe178cf..73ebedd2 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -116,7 +116,7 @@ extern "C" { #endif /* CALLBACK */ /* Include because most Windows GLU headers need wchar_t and - * the OS X OpenGL header blocks the definition of ptrdiff_t by glext.h. + * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h. * Include it unconditionally to avoid surprising side-effects. */ #include @@ -561,7 +561,7 @@ extern "C" { * @par * 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. OS X does not provide OpenGL ES at all. The Mesa + * 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. */ @@ -1247,7 +1247,7 @@ typedef struct GLFWimage * * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. * - * @remark @osx This function will change the current directory of the + * @remark @macos This function will change the current directory of the * application to the `Contents/Resources` subdirectory of the application's * bundle, if present. This can be disabled with a * [compile-time option](@ref compile_options_osx). @@ -1821,19 +1821,19 @@ GLFWAPI void glfwWindowHint(int hint, int value); * @remark @win32 The context to share resources with must not be current on * any other thread. * - * @remark @osx The GLFW window has no icon, as it is not a document + * @remark @macos The GLFW window has no icon, as it is not a document * window, but the dock icon will be the same as the application bundle's icon. * For more information on bundles, see the * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) * in the Mac Developer Library. * - * @remark @osx The first time a window is created the menu bar is populated + * @remark @macos The first time a window is created the menu bar is populated * with common commands like Hide, Quit and About. The About entry opens * a minimal about dialog with information from the application's bundle. The * menu bar can be disabled with a * [compile-time option](@ref compile_options_osx). * - * @remark @osx On OS X 10.10 and later the window frame will not be rendered + * @remark @macos On OS X 10.10 and later the window frame will not be rendered * at full resolution on Retina displays unless the `NSHighResolutionCapable` * key is enabled in the application bundle's `Info.plist`. For more * information, see @@ -1959,7 +1959,7 @@ GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value); * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref * GLFW_PLATFORM_ERROR. * - * @remark @osx The window title will not be updated until the next time you + * @remark @macos The window title will not be updated until the next time you * process events. * * @thread_safety This function must only be called from the main thread. @@ -1996,7 +1996,7 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); * @pointer_lifetime The specified image data is copied before this function * returns. * - * @remark @osx The GLFW window has no icon, as it is not a document + * @remark @macos The GLFW window has no icon, as it is not a document * window, so this function does nothing. The dock icon will be the same as * the application bundle's icon. For more information on bundles, see the * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) @@ -2692,8 +2692,8 @@ GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwind * * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. * - * @remark @osx Selecting Quit from the application menu will trigger the close - * callback for all windows. + * @remark @macos Selecting Quit from the application menu will trigger the + * close callback for all windows. * * @thread_safety This function must only be called from the main thread. * @@ -3458,7 +3458,7 @@ GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun cbfun); * * The character callback behaves as system text input normally does and will * not be called if modifier keys are held down that would prevent normal text - * input on that platform, for example a Super (Command) key on OS X or Alt key + * input on that platform, for example a Super (Command) key on macOS or Alt key * on Windows. There is a * [character with modifiers callback](@ref glfwSetCharModsCallback) that * receives these events. diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 3c92fb4f..fba749db 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index e7c931e3..0d6cb8fd 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2002-2006 Marcus Geelnard // Copyright (c) 2006-2016 Camilla Berglund diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index d76d7de7..6147e538 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // diff --git a/src/cocoa_time.c b/src/cocoa_time.c index 9a0bf6a2..5e6d893a 100644 --- a/src/cocoa_time.c +++ b/src/cocoa_time.c @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 1cc2ffeb..5db64cc8 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // @@ -162,7 +162,7 @@ static void releaseMonitor(_GLFWwindow* window) _glfwRestoreVideoModeNS(window->monitor); } -// Translates OS X key modifiers into GLFW ones +// Translates macOS key modifiers into GLFW ones // static int translateFlags(NSUInteger flags) { @@ -180,7 +180,7 @@ static int translateFlags(NSUInteger flags) return mods; } -// Translates a OS X keycode to a GLFW keycode +// Translates a macOS keycode to a GLFW keycode // static int translateKey(unsigned int key) { diff --git a/src/nsgl_context.h b/src/nsgl_context.h index aa42d237..62b194c8 100644 --- a/src/nsgl_context.h +++ b/src/nsgl_context.h @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // diff --git a/src/nsgl_context.m b/src/nsgl_context.m index 6c1f5a20..eea4e50a 100644 --- a/src/nsgl_context.m +++ b/src/nsgl_context.m @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.3 OS X - www.glfw.org +// GLFW 3.3 macOS - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2009-2016 Camilla Berglund // @@ -124,14 +124,14 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, if (ctxconfig->client == GLFW_OPENGL_ES_API) { _glfwInputError(GLFW_API_UNAVAILABLE, - "NSGL: OpenGL ES is not available on OS X"); + "NSGL: OpenGL ES is not available on macOS"); return GLFW_FALSE; } if (ctxconfig->major == 3 && ctxconfig->minor < 2) { _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "NSGL: The targeted version of OS X does not support OpenGL 3.0 or 3.1"); + "NSGL: The targeted version of macOS does not support OpenGL 3.0 or 3.1"); return GLFW_FALSE; } @@ -140,23 +140,23 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, if (!ctxconfig->forward) { _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "NSGL: The targeted version of OS X only supports forward-compatible contexts for OpenGL 3.2 and above"); + "NSGL: The targeted version of macOS only supports forward-compatible contexts for OpenGL 3.2 and above"); return GLFW_FALSE; } if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE) { _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "NSGL: The targeted version of OS X only supports core profile contexts for OpenGL 3.2 and above"); + "NSGL: The targeted version of macOS only supports core profile contexts for OpenGL 3.2 and above"); return GLFW_FALSE; } } // Context robustness modes (GL_KHR_robustness) are not yet supported on - // OS X but are not a hard constraint, so ignore and continue + // macOS but are not a hard constraint, so ignore and continue // Context release behaviors (GL_KHR_context_flush_control) are not yet - // supported on OS X but are not a hard constraint, so ignore and continue + // supported on macOS but are not a hard constraint, so ignore and continue #define ADD_ATTR(x) { attributes[attributeCount++] = x; } #define ADD_ATTR2(x, y) { ADD_ATTR(x); ADD_ATTR(y); } @@ -206,7 +206,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, fbconfig->greenBits + fbconfig->blueBits; - // OS X needs non-zero color size, so set reasonable values + // macOS needs non-zero color size, so set reasonable values if (colorBits == 0) colorBits = 24; else if (colorBits < 15) diff --git a/src/win32_window.c b/src/win32_window.c index db24c75d..c88f343d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -668,7 +668,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_MOUSEHWHEEL: { // This message is only sent on Windows Vista and later - // NOTE: The X-axis is inverted for consistency with OS X and X11. + // NOTE: The X-axis is inverted for consistency with macOS and X11 _glfwInputScroll(window, -((SHORT) HIWORD(wParam) / (double) WHEEL_DELTA), 0.0); return 0; }