dolphin/Source/Plugins/Plugin_VideoOGL/Src/Win32Window.h
XTra.KrazzY cd658ac755 More WIP OGL EventHandler work by shuffle2 and myself. Wiimote isn't implemented yet and OGL window is too small (should take window borders into account when creating window).
Not committing VideoOGL.vcproj so that project compiles with old OGL video window. In order to test just replace main.cpp/GLUtil.cpp/GLUtil.h with nmain.cpp/nGLUtil.cpp/nGLUtil.h in the project.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2038 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-01-29 23:35:31 +00:00

70 lines
1.6 KiB
C++

#ifndef _WIN32WINDOW_H
#define _WIN32WINDOW_H
#include "GLWindow.h"
#ifdef _WIN32
class Win32Window : public GLWindow
{
public:
virtual void SwapBuffers();
virtual void SetWindowText(const char *text);
virtual bool PeekMessages();
virtual void Update();
virtual bool MakeCurrent();
HWND GetWnd(){return myHandle;};
HWND GetParentWnd(){return myParent;};
static bool valid() { return true; }
~Win32Window();
Win32Window();
static sf::Key::Code VirtualKeyCodeToSF(WPARAM VirtualKey, LPARAM Flags);
static sf::Key::Code GetShiftState(bool KeyDown);
private:
struct VideoMode
{
unsigned int Width;
unsigned int Height;
unsigned int BitsPerPixel;
unsigned int DepthBits;
unsigned int StencilBits;
unsigned int AntialiasingLevel;
};
virtual void ShowMouseCursor(bool Show);
void RegisterWindowClass();
void SwitchToFullscreen(const VideoMode& Mode);
void CreateContext(VideoMode& Mode);
void Cleanup();
void ProcessEvent(UINT Message, WPARAM WParam, LPARAM LParam);
static LRESULT CALLBACK GlobalOnEvent(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam);
// Static member data
static unsigned int ourWindowCount;
static const char* ourClassName;
static Win32Window* ourFullscreenWindow;
// Member data
HWND myHandle;
HINSTANCE myhInstance;
HWND myParent; // Possibly not wanted here
long myCallback;
HCURSOR myCursor;
HICON myIcon;
bool myKeyRepeatEnabled;
bool myIsCursorIn;
HDC myDeviceContext;
HGLRC myGLContext;
};
#else
class Win32Window : public GLWindow
{
public:
Win32Window {}
};
#endif //_WIN32
#endif //_WIN32WINDOW_H