#include <Window.h>
Public Types | |
| typedef void(* | QUIT_CALLBACK )(void *user_data) |
Public Member Functions | |
| Window (void) | |
| ~Window (void) | |
| HWND | GetHandle () const |
| int | GetWidth () const |
| int | GetHeight () const |
| ml7::Vector2 | GetSize () const |
| float | GetAspect () const |
| const cl7::string_type & | GetTitle () const |
| HICON | GetIconHandle () const |
| bool | IsActive () const |
| QUIT_CALLBACK | GetQuitCallback () const |
| void * | GetQuitData () const |
| void | SetQuitCallback (QUIT_CALLBACK quit_callback) |
| void | SetQuitCallback (QUIT_CALLBACK quit_callback, void *user_data) |
| void | SetQuitData (void *user_data) |
| bool | ShowWindow () |
| bool | HideWindow () |
| errorcodes::ErrorCode | Close () |
Public Attributes | |
| errorcodes::ErrorCode | window_class_error |
| errorcodes::ErrorCode | create_window_error |
| errorcodes::ErrorCode | init_window_error |
| errorcodes::ErrorCode | init_window_success |
| errorcodes::ErrorCode | shutdown_window_error |
| errorcodes::ErrorCode | shutdown_window_success |
The DirectX window.
| typedef void(* xl7::directx::Window::QUIT_CALLBACK)(void *user_data) |
| xl7::directx::Window::Window | ( | void | ) |
Default constructor.
| xl7::directx::Window::~Window | ( | void | ) |
Destructor.
| errorcodes::ErrorCode xl7::directx::Window::Close | ( | ) |
Closes the window (and destroys it).
| float xl7::directx::Window::GetAspect | ( | ) | const [inline] |
Returns the aspect ratio (pixel width / pixel height).
| HWND xl7::directx::Window::GetHandle | ( | ) | const [inline] |
Returns the handle of the window.
| int xl7::directx::Window::GetHeight | ( | ) | const [inline] |
Returns the window height in pixels.
| HICON xl7::directx::Window::GetIconHandle | ( | ) | const [inline] |
Returns the handle of the icon (or NULL).
| QUIT_CALLBACK xl7::directx::Window::GetQuitCallback | ( | ) | const [inline] |
Returns the quit callback function that will be called when the window gets closed (and thus destroyed).
| void* xl7::directx::Window::GetQuitData | ( | ) | const [inline] |
Returns the object that will be passed to the quit callback function.
| ml7::Vector2 xl7::directx::Window::GetSize | ( | ) | const [inline] |
Returns the window size in pixels.
| const cl7::string_type& xl7::directx::Window::GetTitle | ( | ) | const [inline] |
Returns the title of the window.
| int xl7::directx::Window::GetWidth | ( | ) | const [inline] |
Returns the window width in pixels.
| bool xl7::directx::Window::HideWindow | ( | ) |
Hides the window (makes the window unvisible). The function returns true, if the window was visible before.
| bool xl7::directx::Window::IsActive | ( | ) | const [inline] |
Returns the flag specifying whether the window is currently active.
| void xl7::directx::Window::SetQuitCallback | ( | QUIT_CALLBACK | quit_callback | ) | [inline] |
Sets the quit callback function that will be called when the window gets closed (and thus destroyed).
| void xl7::directx::Window::SetQuitCallback | ( | QUIT_CALLBACK | quit_callback, | |
| void * | user_data | |||
| ) | [inline] |
Sets the quit callback function that will be called when the window gets closed (and thus destroyed) as well as the object that will be passed to the quit callback function.
| void xl7::directx::Window::SetQuitData | ( | void * | user_data | ) | [inline] |
Sets the object that will be passed to the quit callback function.
| bool xl7::directx::Window::ShowWindow | ( | ) |
Shows the window (makes the window visible). The function returns true, if the window was visible before.
CreateWindow failed and returned NULL.
Window not initialized correctly.
Window successfully initialized.
Window not shut down correctly.
Window successfully shut down.
RegisterClassEx (or UnregisterClass) failed and returned FALSE.
1.7.1