Merge branch 'master' into multi-monitor

Conflicts:
	include/GL/glfw3.h
	src/CMakeLists.txt
	src/fullscreen.c
	src/internal.h
	src/win32_fullscreen.c
	src/win32_platform.h
	src/x11_fullscreen.c
	tests/modes.c
This commit is contained in:
Camilla Berglund
2012-08-03 02:57:33 +02:00
28 changed files with 1330 additions and 1078 deletions

View File

@@ -71,7 +71,6 @@ extern "C" {
*/
#if __MINGW64__
#define WINAPI
#include <stddef.h>
#endif
/* The following three defines are here solely to make some Windows-based
@@ -110,11 +109,10 @@ extern "C" {
#define GLFW_CALLBACK_DEFINED
#endif /* CALLBACK */
/* Microsoft Visual C++, Borland C++ and Pelles C <GL*glu.h> needs wchar_t */
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)) && !defined(_WCHAR_T_DEFINED)
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif /* _WCHAR_T_DEFINED */
/* Most <GL/glu.h> variants on Windows need wchar_t */
#if defined(_WIN32)
#include <stddef.h>
#endif
/* ---------------- GLFW related system specific defines ----------------- */
@@ -390,7 +388,6 @@ extern "C" {
/* glfwGetWindowParam tokens */
#define GLFW_ACTIVE 0x00020001
#define GLFW_ICONIFIED 0x00020002
#define GLFW_ACCELERATED 0x00020003
#define GLFW_OPENGL_REVISION 0x00020004
/* The following constants are used for both glfwGetWindowParam
@@ -449,7 +446,7 @@ extern "C" {
/* glfwGetError/glfwErrorString tokens */
#define GLFW_NO_ERROR 0
#define GLFW_NOT_INITIALIZED 0x00070001
#define GLFW_NO_CURRENT_WINDOW 0x00070002
#define GLFW_NO_CURRENT_CONTEXT 0x00070002
#define GLFW_INVALID_ENUM 0x00070003
#define GLFW_INVALID_VALUE 0x00070004
#define GLFW_OUT_OF_MEMORY 0x00070005
@@ -546,7 +543,7 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor monitor, int param);
GLFWAPI GLFWmonitor glfwGetNextMonitor(GLFWmonitor iterator);
/* Video mode functions */
GLFWAPI int glfwGetVideoModes(GLFWmonitor monitor, GLFWvidmode* list, int maxcount);
GLFWAPI GLFWvidmode* glfwGetVideoModes(GLFWmonitor monitor, int* count);
GLFWAPI void glfwGetDesktopMode(GLFWvidmode* mode);
/* Gamma ramp functions */

97
include/GL/glfw3native.h Normal file
View File

@@ -0,0 +1,97 @@
/*************************************************************************
* GLFW - An OpenGL library
* API version: 3.0
* WWW: http://www.glfw.org/
*------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard
* Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
*
* 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 __glfw3_platform_h__
#define __glfw3_platform_h__
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************
* System headers and types
*************************************************************************/
#if defined(GLFW_EXPOSE_NATIVE_WIN32_WGL)
/* We are building for Win32 and WGL */
#include <windows.h>
#elif defined(GLFW_EXPOSE_NATIVE_COCOA_NSGL)
/* We are building for Cocoa and NSOpenGL */
#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
#else
typedef void* id;
#endif
#elif defined(GLFW_EXPOSE_NATIVE_X11_GLX)
/* We are building for X11 and GLX */
#include <X11/Xlib.h>
#else
#error "No platform specified"
#endif
/*************************************************************************
* Functions
*************************************************************************/
#if defined(GLFW_EXPOSE_NATIVE_WIN32_WGL)
GLFWAPI HWND glfwGetWin32Window(GLFWwindow window);
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow window);
#elif defined(GLFW_EXPOSE_NATIVE_COCOA_NSGL)
GLFWAPI id glfwGetCocoaWindow(GLFWwindow window);
GLFWAPI id glfwGetNSGLContext(GLFWwindow window);
#elif defined(GLFW_EXPOSE_NATIVE_X11_GLX)
GLFWAPI Display* glfwGetX11Display(void);
GLFWAPI Window glfwGetX11Window(GLFWwindow window);
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow window);
#endif
#ifdef __cplusplus
}
#endif
#endif /* __glfw3_platform_h__ */