From 484a2714fcc3f09ec43792243875342aae994b7a Mon Sep 17 00:00:00 2001
From: Camilla Berglund
Date: Fri, 10 Sep 2010 13:24:19 +0200
Subject: [PATCH] Renamed GLFW_WINDOW to GLFW_WINDOWED.
---
examples/boing.c | 2 +-
examples/gears.c | 2 +-
examples/splitview.c | 2 +-
examples/triangle.c | 2 +-
examples/wave.c | 2 +-
include/GL/glfw3.h | 2 +-
readme.html | 1 +
src/window.c | 2 +-
src/x11/x11_window.c | 2 +-
tests/accuracy.c | 2 +-
tests/defaults.c | 2 +-
tests/events.c | 2 +-
tests/fsaa.c | 2 +-
tests/peter.c | 2 +-
tests/reopen.c | 4 ++--
tests/tearing.c | 2 +-
tests/version.c | 2 +-
tests/windows.c | 2 +-
18 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/examples/boing.c b/examples/boing.c
index adb814ee..94f1a5d7 100644
--- a/examples/boing.c
+++ b/examples/boing.c
@@ -576,7 +576,7 @@ int main( void )
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
- GLFWwindow window = glfwOpenWindow( 400, 400, GLFW_WINDOW );
+ GLFWwindow window = glfwOpenWindow( 400, 400, GLFW_WINDOWED );
if (!window)
{
fprintf( stderr, "Failed to open GLFW window\n" );
diff --git a/examples/gears.c b/examples/gears.c
index b3894735..a7eadc21 100644
--- a/examples/gears.c
+++ b/examples/gears.c
@@ -331,7 +331,7 @@ int main(int argc, char *argv[])
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
- window = glfwOpenWindow( 300, 300, GLFW_WINDOW );
+ window = glfwOpenWindow( 300, 300, GLFW_WINDOWED );
if (!window)
{
fprintf( stderr, "Failed to open GLFW window\n" );
diff --git a/examples/splitview.c b/examples/splitview.c
index 70b81e19..122cafc2 100644
--- a/examples/splitview.c
+++ b/examples/splitview.c
@@ -460,7 +460,7 @@ int main( void )
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
// Open OpenGL window
- window = glfwOpenWindow( 500, 500, GLFW_WINDOW );
+ window = glfwOpenWindow( 500, 500, GLFW_WINDOWED );
if (!window)
{
fprintf( stderr, "Failed to open GLFW window\n" );
diff --git a/examples/triangle.c b/examples/triangle.c
index b8babb34..47a69bf0 100644
--- a/examples/triangle.c
+++ b/examples/triangle.c
@@ -23,7 +23,7 @@ int main( void )
}
// Open a window and create its OpenGL context
- window = glfwOpenWindow( 640, 480, GLFW_WINDOW );
+ window = glfwOpenWindow( 640, 480, GLFW_WINDOWED );
if (!window)
{
fprintf( stderr, "Failed to open GLFW window\n" );
diff --git a/examples/wave.c b/examples/wave.c
index fbd07c91..a45afa2e 100644
--- a/examples/wave.c
+++ b/examples/wave.c
@@ -332,7 +332,7 @@ int main(int argc, char* argv[])
/* Desired window properties */
width = 640;
height = 480;
- mode = GLFW_WINDOW;
+ mode = GLFW_WINDOWED;
glfwOpenWindowHint(GLFW_DEPTH_BITS, 16);
diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index 484adea2..07c93a2f 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -302,7 +302,7 @@ extern "C" {
*************************************************************************/
/* glfwOpenWindow modes */
-#define GLFW_WINDOW 0x00010001
+#define GLFW_WINDOWED 0x00010001
#define GLFW_FULLSCREEN 0x00010002
/* glfwGetWindowParam tokens */
diff --git a/readme.html b/readme.html
index dbd0893c..c0a4db50 100644
--- a/readme.html
+++ b/readme.html
@@ -270,6 +270,7 @@ version of GLFW.
Changed buffer bit depth parameters of glfwOpenWindow
to window hints
Renamed lib
source code directory to src
Renamed glfw.h
to glfw3.h
to avoid conflicts with 2.x series
+ Renamed GLFW_WINDOW
token to GLFW_WINDOWED
Replaced ad hoc build system with CMake
Updated all included test and example programs to use the new API
Made Unicode character input unaffected by GLFW_KEY_REPEAT
diff --git a/src/window.c b/src/window.c
index 34f1b033..bc30ab2b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -464,7 +464,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode)
return GL_FALSE;
}
- if (mode != GLFW_WINDOW && mode != GLFW_FULLSCREEN)
+ if (mode != GLFW_WINDOWED && mode != GLFW_FULLSCREEN)
{
// Invalid window mode
glfwCloseWindow(window);
diff --git a/src/x11/x11_window.c b/src/x11/x11_window.c
index 11451ba4..8f3d41a0 100644
--- a/src/x11/x11_window.c
+++ b/src/x11/x11_window.c
@@ -746,7 +746,7 @@ static GLboolean createWindow(_GLFWwindow* window,
PointerMotionMask | ButtonPressMask | ButtonReleaseMask |
ExposureMask | FocusChangeMask | VisibilityChangeMask;
- if (wndconfig->mode == GLFW_WINDOW)
+ if (wndconfig->mode == GLFW_WINDOWED)
{
// The /only/ reason we are setting the background pixel here is
// that otherwise our window wont get any decorations on systems
diff --git a/tests/accuracy.c b/tests/accuracy.c
index 5d85ceca..db8307a7 100644
--- a/tests/accuracy.c
+++ b/tests/accuracy.c
@@ -65,7 +65,7 @@ int main(void)
exit(EXIT_FAILURE);
}
- window = glfwOpenWindow(window_width, window_height, GLFW_WINDOW);
+ window = glfwOpenWindow(window_width, window_height, GLFW_WINDOWED);
if (!window)
{
glfwTerminate();
diff --git a/tests/defaults.c b/tests/defaults.c
index 66f4c704..b97ba671 100644
--- a/tests/defaults.c
+++ b/tests/defaults.c
@@ -75,7 +75,7 @@ int main(void)
exit(1);
}
- window = glfwOpenWindow(0, 0, GLFW_WINDOW);
+ window = glfwOpenWindow(0, 0, GLFW_WINDOWED);
if (!window)
{
glfwTerminate();
diff --git a/tests/events.c b/tests/events.c
index f88725d6..cf7d1f43 100644
--- a/tests/events.c
+++ b/tests/events.c
@@ -274,7 +274,7 @@ int main(void)
printf("Library initialized\n");
- window = glfwOpenWindow(0, 0, GLFW_WINDOW);
+ window = glfwOpenWindow(0, 0, GLFW_WINDOWED);
if (!window)
{
glfwTerminate();
diff --git a/tests/fsaa.c b/tests/fsaa.c
index 4f52dfc0..5950e74d 100644
--- a/tests/fsaa.c
+++ b/tests/fsaa.c
@@ -55,7 +55,7 @@ int main(void)
glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
- window = glfwOpenWindow(400, 400, GLFW_WINDOW);
+ window = glfwOpenWindow(400, 400, GLFW_WINDOWED);
if (!window)
{
glfwTerminate();
diff --git a/tests/peter.c b/tests/peter.c
index 837a8da0..1ae3014c 100644
--- a/tests/peter.c
+++ b/tests/peter.c
@@ -89,7 +89,7 @@ static GLboolean open_window(void)
{
int x, y;
- window_handle = glfwOpenWindow(0, 0, GLFW_WINDOW);
+ window_handle = glfwOpenWindow(0, 0, GLFW_WINDOWED);
if (!window_handle)
return GL_FALSE;
diff --git a/tests/reopen.c b/tests/reopen.c
index 167f9990..3276b811 100644
--- a/tests/reopen.c
+++ b/tests/reopen.c
@@ -45,7 +45,7 @@ static const char* get_mode_name(int mode)
{
switch (mode)
{
- case GLFW_WINDOW:
+ case GLFW_WINDOWED:
return "windowed";
case GLFW_FULLSCREEN:
return "fullscreen";
@@ -128,7 +128,7 @@ int main(int argc, char** argv)
for (;;)
{
- if (!open_window(640, 480, (count & 1) ? GLFW_FULLSCREEN : GLFW_WINDOW))
+ if (!open_window(640, 480, (count & 1) ? GLFW_FULLSCREEN : GLFW_WINDOWED))
{
glfwTerminate();
exit(1);
diff --git a/tests/tearing.c b/tests/tearing.c
index cb04662b..719cfbc2 100644
--- a/tests/tearing.c
+++ b/tests/tearing.c
@@ -50,7 +50,7 @@ int main(void)
exit(1);
}
- window = glfwOpenWindow(0, 0, GLFW_WINDOW);
+ window = glfwOpenWindow(0, 0, GLFW_WINDOWED);
if (!window)
{
glfwTerminate();
diff --git a/tests/version.c b/tests/version.c
index 2bbdcebf..5e6b1f70 100644
--- a/tests/version.c
+++ b/tests/version.c
@@ -183,7 +183,7 @@ int main(int argc, char** argv)
// We assume here that we stand a better chance of success by leaving all
// possible details of pixel format selection to GLFW
- if (!glfwOpenWindow(0, 0, GLFW_WINDOW))
+ if (!glfwOpenWindow(0, 0, GLFW_WINDOWED))
{
glfwTerminate();
diff --git a/tests/windows.c b/tests/windows.c
index 555da0be..5212852b 100644
--- a/tests/windows.c
+++ b/tests/windows.c
@@ -42,7 +42,7 @@ static const char* titles[] =
static GLFWwindow open_window(int width, int height, const char* title)
{
- GLFWwindow window = glfwOpenWindow(width, height, GLFW_WINDOW);
+ GLFWwindow window = glfwOpenWindow(width, height, GLFW_WINDOWED);
if (!window)
{
fprintf(stderr, "Failed to open GLFW default window\n");