mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Added window title to glfwOpenWindow.
This commit is contained in:
parent
3863a22dc1
commit
0f80e066ea
@ -410,7 +410,7 @@ GLFWAPI int glfwGetVideoModes(GLFWvidmode* list, int maxcount);
|
||||
GLFWAPI void glfwGetDesktopMode(GLFWvidmode* mode);
|
||||
|
||||
/* Window handling */
|
||||
GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode);
|
||||
GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode, const char* title);
|
||||
GLFWAPI void glfwOpenWindowHint(int target, int hint);
|
||||
GLFWAPI void glfwMakeWindowCurrent(GLFWwindow window);
|
||||
GLFWAPI int glfwIsWindow(GLFWwindow window);
|
||||
|
@ -268,6 +268,7 @@ version of GLFW.</p>
|
||||
<li>Added <code>glfwSetWindowUserPointer</code> and <code>glfwGetWindowUserPointer</code> functions for per-window user pointers</li>
|
||||
<li>Added <code>glfwGetVersionString</code> function for determining which code paths were enabled at compile time</li>
|
||||
<li>Added <code>windows</code> simple multi-window test program</li>
|
||||
<li>Added initial window title parameter to <code>glfwOpenWindow</code></li>
|
||||
<li>Changed buffer bit depth parameters of <code>glfwOpenWindow</code> to window hints</li>
|
||||
<li>Renamed <code>lib</code> source code directory to <code>src</code></li>
|
||||
<li>Renamed <code>glfw.h</code> to <code>glfw3.h</code> to avoid conflicts with 2.x series</li>
|
||||
|
@ -99,6 +99,7 @@ typedef struct _GLFWhints
|
||||
typedef struct _GLFWwndconfig
|
||||
{
|
||||
int mode;
|
||||
const char* title;
|
||||
int refreshRate;
|
||||
int windowNoResize;
|
||||
int glMajor;
|
||||
|
@ -1166,7 +1166,7 @@ static int createWindow(_GLFWwindow* window,
|
||||
|
||||
window->Win32.handle = CreateWindowEx(window->Win32.dwExStyle,
|
||||
_GLFW_WNDCLASSNAME,
|
||||
"GLFW Window",
|
||||
wndconfig->title,
|
||||
window->Win32.dwStyle,
|
||||
wa.left, wa.top, // Window position
|
||||
fullWidth, // Decorated window width
|
||||
|
@ -395,7 +395,8 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
||||
// Create the GLFW window and its associated context
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode)
|
||||
GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
int mode, const char* title)
|
||||
{
|
||||
_GLFWfbconfig fbconfig;
|
||||
_GLFWwndconfig wndconfig;
|
||||
@ -436,6 +437,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode)
|
||||
|
||||
// Set up desired window config
|
||||
wndconfig.mode = mode;
|
||||
wndconfig.title = title;
|
||||
wndconfig.refreshRate = Max(_glfwLibrary.hints.refreshRate, 0);
|
||||
wndconfig.windowNoResize = _glfwLibrary.hints.windowNoResize ? GL_TRUE : GL_FALSE;
|
||||
wndconfig.glMajor = Max(_glfwLibrary.hints.glMajor, 1);
|
||||
|
@ -828,7 +828,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||
XFree(hints);
|
||||
}
|
||||
|
||||
_glfwPlatformSetWindowTitle(window, "GLFW Window");
|
||||
_glfwPlatformSetWindowTitle(window, wndconfig->title);
|
||||
|
||||
// Make sure the window is mapped before proceeding
|
||||
XMapWindow(_glfwLibrary.X11.display, window->X11.handle);
|
||||
|
Loading…
Reference in New Issue
Block a user