48 lines
781 B
C
48 lines
781 B
C
|
#pragma once
|
||
|
#ifndef EVENT
|
||
|
#define EVENT
|
||
|
|
||
|
#include <SDL/SDL.h>
|
||
|
|
||
|
#include "devices.h"
|
||
|
|
||
|
class Xr_EventProfil
|
||
|
{
|
||
|
public:
|
||
|
Xr_EventProfil();
|
||
|
~Xr_EventProfil();
|
||
|
|
||
|
virtual void execute(Xr_DevicesDesc*);
|
||
|
};
|
||
|
|
||
|
class Xr_EventManager
|
||
|
{
|
||
|
public:
|
||
|
Xr_EventManager();
|
||
|
~Xr_EventManager();
|
||
|
|
||
|
static Xr_EventManager* getInstance();
|
||
|
static bool instaced();
|
||
|
static void quitInstance();
|
||
|
|
||
|
void setProfil(Xr_EventProfil*);
|
||
|
void updateDeviceState();
|
||
|
void executeProfil();
|
||
|
bool quitEvent();
|
||
|
void genQuitEvent();
|
||
|
|
||
|
void enableMouseCapture();
|
||
|
void disableMouseCapture();
|
||
|
bool mouseCaptured();
|
||
|
|
||
|
private:
|
||
|
static Xr_EventManager* E_instance;
|
||
|
Xr_EventProfil *E_eventProfil;
|
||
|
Xr_DevicesDesc *E_devices;
|
||
|
SDL_Event *E_event;
|
||
|
bool E_mouseCapture;
|
||
|
bool E_quit;
|
||
|
};
|
||
|
|
||
|
#endif
|