1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Renamed GLFW_WINDOW_NO_RESIZE to GLFW_WINDOW_RESIZABLE.

This commit is contained in:
Camilla Berglund 2011-11-02 16:56:34 +01:00
parent 2660b27cf3
commit a18cd1b14c
8 changed files with 21 additions and 17 deletions

View File

@ -583,7 +583,7 @@ int main(int argc, char** argv)
exit(EXIT_FAILURE);
}
glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE);
glfwOpenWindowHint(GLFW_WINDOW_RESIZABLE, GL_FALSE);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

View File

@ -418,7 +418,7 @@ extern "C" {
#define GLFW_ACCUM_ALPHA_BITS 0x0002100A
#define GLFW_AUX_BUFFERS 0x0002100B
#define GLFW_STEREO 0x0002100C
#define GLFW_WINDOW_NO_RESIZE 0x0002100D
#define GLFW_WINDOW_RESIZABLE 0x0002100D
#define GLFW_FSAA_SAMPLES 0x0002100E
#define GLFW_OPENGL_VERSION_MAJOR 0x0002100F
#define GLFW_OPENGL_VERSION_MINOR 0x00021010

View File

@ -287,6 +287,7 @@ version of GLFW.</p>
<li>Changed buffer bit depth parameters of <code>glfwOpenWindow</code> to window hints</li>
<li>Renamed <code>glfw.h</code> to <code>glfw3.h</code> to avoid conflicts with 2.x series</li>
<li>Renamed <code>GLFW_WINDOW</code> token to <code>GLFW_WINDOWED</code></li>
<li>Renamed <code>GLFW_WINDOW_NO_RESIZE</code> to <code>GLFW_WINDOW_RESIZABLE</code></li>
<li>Renamed <code>version</code> test to <code>glfwinfo</code></li>
<li>Replaced ad hoc build system with CMake</li>
<li>Replaced layout-dependent key codes with single, platform-independent set based on US layout</li>

View File

@ -568,7 +568,7 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
styleMask = NSTitledWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask;
if (!wndconfig->windowNoResize)
if (wndconfig->resizable)
styleMask |= NSResizableWindowMask;
}
else
@ -691,7 +691,7 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
window->cursorPosX = point.x;
window->cursorPosY = point.y;
window->windowNoResize = wndconfig->windowNoResize;
window->resizable = wndconfig->resizable;
return GL_TRUE;
}

View File

@ -103,7 +103,7 @@ struct _GLFWhints
int accumAlphaBits;
int auxBuffers;
GLboolean stereo;
GLboolean windowNoResize;
GLboolean resizable;
int samples;
int glMajor;
int glMinor;
@ -125,7 +125,7 @@ struct _GLFWwndconfig
int mode;
const char* title;
int refreshRate;
GLboolean windowNoResize;
GLboolean resizable;
int glMajor;
int glMinor;
GLboolean glForward;
@ -175,7 +175,7 @@ struct _GLFWwindow
int width, height;
int positionX, positionY;
int mode; // GLFW_WINDOW or GLFW_FULLSCREEN
GLboolean windowNoResize; // resize- and maximize gadgets disabled flag
GLboolean resizable; // GL_TRUE if user may resize this window
int refreshRate; // monitor refresh rate
void* userPointer;

View File

@ -1309,7 +1309,7 @@ static int createWindow(_GLFWwindow* window,
{
dwStyle |= WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
if (!wndconfig->windowNoResize)
if (wndconfig->resizable)
{
dwStyle |= (WS_MAXIMIZEBOX | WS_SIZEBOX);
dwExStyle |= WS_EX_WINDOWEDGE;

View File

@ -100,6 +100,9 @@ void _glfwSetDefaultWindowHints(void)
// The default minimum OpenGL version is 1.0
_glfwLibrary.hints.glMajor = 1;
_glfwLibrary.hints.glMinor = 0;
// The default is to allow window resizing
_glfwLibrary.hints.resizable = GL_TRUE;
}
@ -247,7 +250,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
wndconfig.mode = mode;
wndconfig.title = title;
wndconfig.refreshRate = Max(_glfwLibrary.hints.refreshRate, 0);
wndconfig.windowNoResize = _glfwLibrary.hints.windowNoResize ? GL_TRUE : GL_FALSE;
wndconfig.resizable = _glfwLibrary.hints.resizable ? GL_TRUE : GL_FALSE;
wndconfig.glMajor = _glfwLibrary.hints.glMajor;
wndconfig.glMinor = _glfwLibrary.hints.glMinor;
wndconfig.glForward = _glfwLibrary.hints.glForward ? GL_TRUE : GL_FALSE;
@ -419,8 +422,8 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
case GLFW_STEREO:
_glfwLibrary.hints.stereo = hint;
break;
case GLFW_WINDOW_NO_RESIZE:
_glfwLibrary.hints.windowNoResize = hint;
case GLFW_WINDOW_RESIZABLE:
_glfwLibrary.hints.resizable = hint;
break;
case GLFW_FSAA_SAMPLES:
_glfwLibrary.hints.samples = hint;
@ -707,8 +710,8 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
return window->stereo;
case GLFW_REFRESH_RATE:
return window->refreshRate;
case GLFW_WINDOW_NO_RESIZE:
return window->windowNoResize;
case GLFW_WINDOW_RESIZABLE:
return window->resizable;
case GLFW_FSAA_SAMPLES:
return window->samples;
case GLFW_OPENGL_VERSION_MAJOR:

View File

@ -794,7 +794,7 @@ static GLboolean createWindow(_GLFWwindow* window,
hints->flags = 0;
if (wndconfig->windowNoResize)
if (!wndconfig->resizable)
{
hints->flags |= (PMinSize | PMaxSize);
hints->min_width = hints->max_width = window->width;
@ -1392,7 +1392,7 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
_GLFWfbconfig closest;
window->refreshRate = wndconfig->refreshRate;
window->windowNoResize = wndconfig->windowNoResize;
window->resizable = wndconfig->resizable;
initGLXExtensions(window);
@ -1533,7 +1533,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
&width, &height, &rate);
}
if (window->windowNoResize)
if (!window->resizable)
{
// Update window size restrictions to match new window size