GLboolean gameMode, GLboolean isMenu )
{
/* Have the window object created */
- SFG_Window *window = (SFG_Window *)calloc( sizeof(SFG_Window), 1 );
+ SFG_Window *window = (SFG_Window *)calloc( 1, sizeof(SFG_Window) );
fgPlatformCreateWindow ( window );
else
fgListAppend( &fgStructure.Windows, &window->Node );
- /* Set the default mouse cursor and reset the modifiers value */
+ /* Set the default mouse cursor */
window->State.Cursor = GLUT_CURSOR_INHERIT;
-
- window->State.IgnoreKeyRepeat = GL_FALSE;
- window->State.KeyRepeating = GL_FALSE;
- window->State.IsFullscreen = GL_FALSE;
- window->State.VisualizeNormals= GL_FALSE;
-
- window->State.pWState.WindowTitle = NULL;
- window->State.pWState.IconTitle = NULL;
+ /* Mark window as menu if a menu is to be created */
window->IsMenu = isMenu;
/*
lRet = 0; /* Per docs, should return zero */
break;
- /* Other messages that I have seen and which are not handled already */
- case WM_SETTEXT: /* 0x000c */
- lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
- /* Pass it on to "DefWindowProc" to set the window text */
- break;
-
- case WM_GETTEXT: /* 0x000d */
- /* Ideally we would copy the title of the window into "lParam" */
- /* strncpy ( (char *)lParam, "Window Title", wParam );
- lRet = ( wParam > 12 ) ? 12 : wParam; */
- /* the number of characters copied */
- lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
- break;
-
- case WM_GETTEXTLENGTH: /* 0x000e */
- /* Ideally we would get the length of the title of the window */
- lRet = 12;
- /* the number of characters in "Window Title\0" (see above) */
- break;
-
- case WM_ERASEBKGND: /* 0x0014 */
- lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
- break;
-
#if !defined(_WIN32_WCE)
case WM_SYNCPAINT: /* 0x0088 */
/* Another window has moved, need to update this one */
/* Help screen says this message must be passed to "DefWindowProc" */
break;
- case WM_NCPAINT: /* 0x0085 */
- /* Need to update the border of this window */
- lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
- /* Pass it on to "DefWindowProc" to repaint a standard border */
- break;
-
case WM_SYSCOMMAND : /* 0x0112 */
{
/*