Rename Display to Window.
It makes more sense to be consistent and always call it window.
This commit is contained in:
parent
416a71f744
commit
24da7f45e0
33 changed files with 257 additions and 255 deletions
92
source/Platform/Win32/Win32Window.h
Normal file
92
source/Platform/Win32/Win32Window.h
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
|
||||
#ifndef PLATFORM_WIN32_DISPLAY_H
|
||||
#define PLATFORM_WIN32_DISPLAY_H
|
||||
|
||||
#include "Win32GLContext.h"
|
||||
#include <Platform/PlatformWindow.h>
|
||||
#include <cstdint>
|
||||
#include <Windows.h>
|
||||
|
||||
namespace sp {
|
||||
|
||||
class Win32Window : public PlatformWindow
|
||||
{
|
||||
public :
|
||||
Win32Window();
|
||||
virtual ~Win32Window();
|
||||
|
||||
virtual bool create(WindowDescription description);
|
||||
|
||||
virtual void destroy();
|
||||
|
||||
virtual bool isValid();
|
||||
|
||||
virtual void* getHandle() const;
|
||||
|
||||
virtual void setSize(unsigned int width, unsigned int height);
|
||||
|
||||
virtual Vector2u getSize() const;
|
||||
|
||||
virtual void setPosition(unsigned int x, unsigned int y);
|
||||
|
||||
virtual Vector2u getPosition() const;
|
||||
|
||||
virtual void setVisible(bool visible);
|
||||
|
||||
virtual void setDecoration(unsigned decoration);
|
||||
|
||||
virtual void enterFullscreen(DisplayMode mode);
|
||||
|
||||
virtual void exitFullscreen();
|
||||
|
||||
virtual void minimize();
|
||||
|
||||
virtual void maximize();
|
||||
|
||||
virtual void setCaption(const std::string& caption);
|
||||
|
||||
virtual void setIcon(unsigned int width, unsigned int height, const uint8_t *pixels);
|
||||
|
||||
virtual void showCursor(bool value);
|
||||
|
||||
virtual void grabCursor(bool value);
|
||||
|
||||
protected :
|
||||
|
||||
void registerClass();
|
||||
|
||||
Vector2u calculateSize(DWORD flags, LONG width, LONG height);
|
||||
|
||||
DWORD getWin32Flags(unsigned int flags);
|
||||
|
||||
Vector2i centerWindow(int width, int height);
|
||||
|
||||
void processMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
void processResizeMessage(const Vector2u& new_size);
|
||||
|
||||
static LRESULT CALLBACK staticWndProc(HWND handle, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
protected :
|
||||
|
||||
HWND m_handle;
|
||||
|
||||
HCURSOR m_cursor;
|
||||
|
||||
HICON m_icon;
|
||||
|
||||
// True if this window is in a resize loop.
|
||||
bool m_inResizeModalLoop;
|
||||
|
||||
// Client area size. cached here to check if a resize has been made.
|
||||
Vector2u m_size;
|
||||
|
||||
Vector2u m_minSize;
|
||||
|
||||
// Fullscreen mode.
|
||||
DisplayMode m_fs_mode;
|
||||
};
|
||||
|
||||
} // namespace sp
|
||||
|
||||
#endif /* PLATFORM_WIN32_DISPLAY_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue