2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2006-02-11 12:54:56 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2006-02-11 12:54:56 +00:00
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-07-23 15:32:14 +00:00
|
|
|
#ifndef LURE_EVENTS_H
|
|
|
|
#define LURE_EVENTS_H
|
2006-02-11 12:54:56 +00:00
|
|
|
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2007-03-17 19:02:05 +00:00
|
|
|
#include "common/events.h"
|
2006-02-11 12:54:56 +00:00
|
|
|
#include "common/str.h"
|
|
|
|
#include "lure/luredefs.h"
|
|
|
|
#include "lure/disk.h"
|
|
|
|
|
|
|
|
namespace Lure {
|
|
|
|
|
|
|
|
class Mouse {
|
|
|
|
private:
|
2007-06-22 12:36:04 +00:00
|
|
|
CursorType _cursorNum;
|
2006-02-11 12:54:56 +00:00
|
|
|
int16 _x, _y;
|
2007-12-29 09:50:20 +00:00
|
|
|
bool _lButton, _rButton, _mButton;
|
2006-02-11 12:54:56 +00:00
|
|
|
public:
|
2006-02-26 13:43:50 +00:00
|
|
|
Mouse();
|
2006-02-11 12:54:56 +00:00
|
|
|
~Mouse();
|
2007-09-19 08:40:12 +00:00
|
|
|
static Mouse &getReference();
|
2007-03-17 19:02:05 +00:00
|
|
|
void handleEvent(Common::Event event);
|
2006-02-11 12:54:56 +00:00
|
|
|
|
|
|
|
void cursorOn();
|
|
|
|
void cursorOff();
|
2007-06-22 12:36:04 +00:00
|
|
|
void setCursorNum(CursorType cursorNum);
|
|
|
|
void setCursorNum(CursorType cursorNum, int hotspotX, int hotspotY);
|
|
|
|
CursorType getCursorNum() { return _cursorNum; }
|
2006-02-11 12:54:56 +00:00
|
|
|
void setPosition(int x, int y);
|
|
|
|
int16 x() { return _x; }
|
|
|
|
int16 y() { return _y; }
|
|
|
|
bool lButton() { return _lButton; }
|
|
|
|
bool rButton() { return _rButton; }
|
2007-12-29 09:50:20 +00:00
|
|
|
bool mButton() { return _mButton; }
|
2006-02-11 12:54:56 +00:00
|
|
|
void waitForRelease();
|
2007-06-22 12:36:04 +00:00
|
|
|
void pushCursorNum(CursorType cursorNum);
|
2007-09-19 08:40:12 +00:00
|
|
|
void pushCursorNum(CursorType cursorNum, int hotspotX, int hotspotY);
|
2006-10-02 12:47:29 +00:00
|
|
|
void popCursor();
|
2006-02-11 12:54:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class Events {
|
|
|
|
private:
|
2007-03-17 19:02:05 +00:00
|
|
|
Common::Event _event;
|
2006-02-11 12:54:56 +00:00
|
|
|
public:
|
2006-02-26 13:43:50 +00:00
|
|
|
Events();
|
2006-02-11 12:54:56 +00:00
|
|
|
static Events &getReference();
|
|
|
|
|
|
|
|
bool pollEvent();
|
|
|
|
void waitForPress();
|
2007-06-22 12:36:04 +00:00
|
|
|
bool interruptableDelay(uint32 milliseconds);
|
|
|
|
|
2007-03-17 19:02:05 +00:00
|
|
|
Common::Event event() { return _event; }
|
|
|
|
Common::EventType type() { return _event.type; }
|
2006-02-11 12:54:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Lure
|
|
|
|
|
|
|
|
#endif
|