SDL: Refactor WM specific functionality into SdlGraphicsManager.
This commit is contained in:
parent
4e1ffc9434
commit
3a2db0135d
10 changed files with 88 additions and 26 deletions
|
@ -25,7 +25,9 @@
|
|||
|
||||
#include "backends/graphics/graphics.h"
|
||||
|
||||
#include "backends/platform/sdl/sdl-sys.h"
|
||||
#include "common/rect.h"
|
||||
#include "common/str.h"
|
||||
|
||||
class SdlEventSource;
|
||||
|
||||
|
@ -91,6 +93,42 @@ public:
|
|||
*/
|
||||
virtual void notifyMousePos(Common::Point mouse) = 0;
|
||||
|
||||
/**
|
||||
* Change the caption of the window.
|
||||
*
|
||||
* @param caption New window caption in UTF-8 encoding.
|
||||
*/
|
||||
void setWindowCaption(const Common::String &caption);
|
||||
|
||||
/**
|
||||
* Attach an icon to the window.
|
||||
*
|
||||
* @param icon The surface to use as icon. SdlGraphicsManager takes
|
||||
* ownership over it.
|
||||
*/
|
||||
void setWindowIcon(SDL_Surface *icon);
|
||||
|
||||
/**
|
||||
* Toggle mouse grab state. This decides whether the cursor can leave the
|
||||
* window or not.
|
||||
*/
|
||||
void toggleMouseGrab();
|
||||
|
||||
/**
|
||||
* Check whether the application has mouse focus.
|
||||
*/
|
||||
bool hasMouseFocus() const;
|
||||
|
||||
/**
|
||||
* Warp the mouse to the specified position in window coordinates.
|
||||
*/
|
||||
void warpMouseInWindow(uint x, uint y);
|
||||
|
||||
/**
|
||||
* Iconifies the window.
|
||||
*/
|
||||
void iconifyWindow();
|
||||
|
||||
protected:
|
||||
SdlEventSource *_eventSource;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue