From ef216acc5f3f93fb32f3801a7a5f73739f20a271 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Mon, 8 Mar 2010 17:50:16 +0000 Subject: [PATCH] Minor changes to the documentation and some parameters names git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1444 4e206d99-4929-0410-ac5d-dfc041789085 --- include/SFML/System/Lock.hpp | 5 +++-- include/SFML/System/NonCopyable.hpp | 2 +- include/SFML/Window/Window.hpp | 12 ++++++------ src/SFML/Window/Linux/WindowImplX11.cpp | 8 ++++---- src/SFML/Window/Linux/WindowImplX11.hpp | 12 ++++++------ src/SFML/Window/Win32/WindowImplWin32.cpp | 8 ++++---- src/SFML/Window/Win32/WindowImplWin32.hpp | 12 ++++++------ src/SFML/Window/Window.cpp | 12 ++++++------ src/SFML/Window/WindowImpl.hpp | 12 ++++++------ 9 files changed, 42 insertions(+), 41 deletions(-) diff --git a/include/SFML/System/Lock.hpp b/include/SFML/System/Lock.hpp index 978bd35c..97190ae5 100644 --- a/include/SFML/System/Lock.hpp +++ b/include/SFML/System/Lock.hpp @@ -83,7 +83,8 @@ private : /// always be released when the current scope (most likely /// a function) ends. /// This is even more important when an exception or an early -/// return statement can interrupt the excution flow of the function. +/// return statement can interrupt the execution flow of the +/// function. /// /// For maximum robustness, sf::Lock should always be used /// to lock/unlock a mutex. @@ -129,7 +130,7 @@ private : /// Having a mutex locked longer than required is a bad practice /// which can lead to bad performances. Don't forget that when /// a mutex is locked, other threads may be waiting doing nothing -/// until it ls released. +/// until it is released. /// /// \see sf::Mutex /// diff --git a/include/SFML/System/NonCopyable.hpp b/include/SFML/System/NonCopyable.hpp index 00827f9d..5dd5e8a6 100644 --- a/include/SFML/System/NonCopyable.hpp +++ b/include/SFML/System/NonCopyable.hpp @@ -69,7 +69,7 @@ private : //////////////////////////////////////////////////////////// /// \brief Disabled assignment operator /// - /// By making the copy constructor private, the compiler will + /// By making the assignment operator private, the compiler will /// trigger an error if anyone outside tries to use it. /// To prevent NonCopyable or friend classes from using it, /// we also give no definition, so that the linker will diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index 1fa02e91..6c75ca73 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -282,11 +282,11 @@ public : //////////////////////////////////////////////////////////// /// \brief Change the position of the mouse cursor /// - /// \param left Left coordinate of the cursor, relative to the window - /// \param top Top coordinate of the cursor, relative to the window + /// \param x Left coordinate of the cursor, relative to the window + /// \param y Top coordinate of the cursor, relative to the window /// //////////////////////////////////////////////////////////// - void SetCursorPosition(unsigned int left, unsigned int top); + void SetCursorPosition(unsigned int x, unsigned int y); //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -295,11 +295,11 @@ public : /// (i.e. it will be ignored for windows created from /// the handle of a child window/control). /// - /// \param left Left position - /// \param top Top position + /// \param x Left position + /// \param y Top position /// //////////////////////////////////////////////////////////// - void SetPosition(int left, int top); + void SetPosition(int x, int y); //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window diff --git a/src/SFML/Window/Linux/WindowImplX11.cpp b/src/SFML/Window/Linux/WindowImplX11.cpp index fc47ef6f..d0a0ae22 100644 --- a/src/SFML/Window/Linux/WindowImplX11.cpp +++ b/src/SFML/Window/Linux/WindowImplX11.cpp @@ -317,17 +317,17 @@ void WindowImplX11::ShowMouseCursor(bool show) //////////////////////////////////////////////////////////// -void WindowImplX11::SetCursorPosition(unsigned int left, unsigned int top) +void WindowImplX11::SetCursorPosition(unsigned int x, unsigned int y) { - XWarpPointer(myDisplay, None, myWindow, 0, 0, 0, 0, left, top); + XWarpPointer(myDisplay, None, myWindow, 0, 0, 0, 0, x, y); XFlush(myDisplay); } //////////////////////////////////////////////////////////// -void WindowImplX11::SetPosition(int left, int top) +void WindowImplX11::SetPosition(int x, int y) { - XMoveWindow(myDisplay, myWindow, left, top); + XMoveWindow(myDisplay, myWindow, x, y); XFlush(myDisplay); } diff --git a/src/SFML/Window/Linux/WindowImplX11.hpp b/src/SFML/Window/Linux/WindowImplX11.hpp index 35db4848..c8174193 100644 --- a/src/SFML/Window/Linux/WindowImplX11.hpp +++ b/src/SFML/Window/Linux/WindowImplX11.hpp @@ -110,20 +110,20 @@ private : //////////////////////////////////////////////////////////// /// \brief Change the position of the mouse cursor /// - /// \param left Left coordinate of the cursor, relative to the window - /// \param top Top coordinate of the cursor, relative to the window + /// \param x Left coordinate of the cursor, relative to the window + /// \param y Top coordinate of the cursor, relative to the window /// //////////////////////////////////////////////////////////// - virtual void SetCursorPosition(unsigned int left, unsigned int top); + virtual void SetCursorPosition(unsigned int x, unsigned int y); //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen /// - /// \param left Left position - /// \param top Top position + /// \param x Left position + /// \param y Top position /// //////////////////////////////////////////////////////////// - virtual void SetPosition(int left, int top); + virtual void SetPosition(int x, int y); //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index fec89b64..492f8b46 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -238,18 +238,18 @@ void WindowImplWin32::ShowMouseCursor(bool show) //////////////////////////////////////////////////////////// -void WindowImplWin32::SetCursorPosition(unsigned int left, unsigned int top) +void WindowImplWin32::SetCursorPosition(unsigned int x, unsigned int y) { - POINT position = {left, top}; + POINT position = {x, y}; ClientToScreen(myHandle, &position); SetCursorPos(position.x, position.y); } //////////////////////////////////////////////////////////// -void WindowImplWin32::SetPosition(int left, int top) +void WindowImplWin32::SetPosition(int x, int y) { - SetWindowPos(myHandle, NULL, left, top, 0, 0, SWP_NOSIZE | SWP_NOZORDER); + SetWindowPos(myHandle, NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); } diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index 03d92105..caa128d1 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -99,20 +99,20 @@ private : //////////////////////////////////////////////////////////// /// \brief Change the position of the mouse cursor /// - /// \param left Left coordinate of the cursor, relative to the window - /// \param top Top coordinate of the cursor, relative to the window + /// \param x Left coordinate of the cursor, relative to the window + /// \param y Top coordinate of the cursor, relative to the window /// //////////////////////////////////////////////////////////// - virtual void SetCursorPosition(unsigned int left, unsigned int top); + virtual void SetCursorPosition(unsigned int x, unsigned int y); //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen /// - /// \param left Left position - /// \param top Top position + /// \param x Left position + /// \param y Top position /// //////////////////////////////////////////////////////////// - virtual void SetPosition(int left, int top); + virtual void SetPosition(int x, int y); //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 81ca327f..071a1326 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -251,24 +251,24 @@ void Window::ShowMouseCursor(bool show) //////////////////////////////////////////////////////////// -void Window::SetCursorPosition(unsigned int left, unsigned int top) +void Window::SetCursorPosition(unsigned int x, unsigned int y) { if (myWindow) { // Keep coordinates for later checking (to reject the generated MouseMoved event) - mySetCursorPosX = left; - mySetCursorPosY = top; + mySetCursorPosX = x; + mySetCursorPosY = y; - myWindow->SetCursorPosition(left, top); + myWindow->SetCursorPosition(x, y); } } //////////////////////////////////////////////////////////// -void Window::SetPosition(int left, int top) +void Window::SetPosition(int x, int y) { if (myWindow) - myWindow->SetPosition(left, top); + myWindow->SetPosition(x, y); } diff --git a/src/SFML/Window/WindowImpl.hpp b/src/SFML/Window/WindowImpl.hpp index bb0a3e45..fd47f838 100644 --- a/src/SFML/Window/WindowImpl.hpp +++ b/src/SFML/Window/WindowImpl.hpp @@ -143,20 +143,20 @@ public : //////////////////////////////////////////////////////////// /// \brief Change the position of the mouse cursor /// - /// \param left Left coordinate of the cursor, relative to the window - /// \param top Top coordinate of the cursor, relative to the window + /// \param x Left coordinate of the cursor, relative to the window + /// \param y Top coordinate of the cursor, relative to the window /// //////////////////////////////////////////////////////////// - virtual void SetCursorPosition(unsigned int left, unsigned int top) = 0; + virtual void SetCursorPosition(unsigned int x, unsigned int y) = 0; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen /// - /// \param left Left position - /// \param top Top position + /// \param x Left position + /// \param y Top position /// //////////////////////////////////////////////////////////// - virtual void SetPosition(int left, int top) = 0; + virtual void SetPosition(int x, int y) = 0; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window