diff src/modules/window/sdl/Window.cpp @ 1310:2061cc4dc762

Constified many Graphics and Window methods
author Alex Szpakowski <slime73@gmail.com>
date Sat, 16 Feb 2013 01:45:01 -0400
parents b7f097053d74
children 730ed5f01ab0
line wrap: on
line diff
--- a/src/modules/window/sdl/Window.cpp	Sat Feb 16 01:04:00 2013 -0400
+++ b/src/modules/window/sdl/Window.cpp	Sat Feb 16 01:45:01 2013 -0400
@@ -157,7 +157,7 @@
 	return true;
 }
 
-void Window::getWindow(int &width, int &height, bool &fullscreen, bool &vsync, int &fsaa)
+void Window::getWindow(int &width, int &height, bool &fullscreen, bool &vsync, int &fsaa) const
 {
 	width = currentMode.width;
 	height = currentMode.height;
@@ -166,7 +166,7 @@
 	fsaa = currentMode.fsaa;
 }
 
-bool Window::checkWindowSize(int width, int height, bool fullscreen)
+bool Window::checkWindowSize(int width, int height, bool fullscreen) const
 {
 	Uint32 sdlflags = fullscreen ? (SDL_OPENGL | SDL_FULLSCREEN) : SDL_OPENGL;
 
@@ -178,7 +178,7 @@
 
 typedef Window::WindowSize WindowSize;
 
-WindowSize **Window::getFullscreenSizes(int &n)
+WindowSize **Window::getFullscreenSizes(int &n) const
 {
 	SDL_Rect **modes = SDL_ListModes(0, SDL_OPENGL | SDL_FULLSCREEN);
 
@@ -203,17 +203,17 @@
 	return sizes;
 }
 
-int Window::getWidth()
+int Window::getWidth() const
 {
 	return currentMode.width;
 }
 
-int Window::getHeight()
+int Window::getHeight() const
 {
 	return currentMode.height;
 }
 
-bool Window::isCreated()
+bool Window::isCreated() const
 {
 	return created;
 }
@@ -224,7 +224,7 @@
 	SDL_WM_SetCaption(windowTitle.c_str(), 0);
 }
 
-std::string Window::getWindowTitle()
+std::string Window::getWindowTitle() const
 {
 	// not a reference
 	// because we want this untouched
@@ -262,7 +262,7 @@
 	SDL_GL_SwapBuffers();
 }
 
-bool Window::hasFocus()
+bool Window::hasFocus() const
 {
 	return (SDL_GetAppState() & SDL_APPINPUTFOCUS) != 0;
 }
@@ -272,7 +272,7 @@
 	SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE);
 }
 
-bool Window::getMouseVisible()
+bool Window::getMouseVisible() const
 {
 	return (SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE) ? true : false;
 }