3
* Copyright (C) 2011-2014 The ManaPlus Developers
5
* This file is part of The ManaPlus Client.
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
/* _______ __ __ __ ______ __ __ _______ __ __
22
* / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
23
* / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
24
* / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
25
* / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
26
* /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
27
* \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
29
* Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson
32
* Per Larsson a.k.a finalman
33
* Olof Naessén a.k.a jansem/yakslem
35
* Visit: http://guichan.sourceforge.net
38
* Redistribution and use in source and binary forms, with or without
39
* modification, are permitted provided that the following conditions
41
* 1. Redistributions of source code must retain the above copyright
42
* notice, this list of conditions and the following disclaimer.
43
* 2. Redistributions in binary form must reproduce the above copyright
44
* notice, this list of conditions and the following disclaimer in
45
* the documentation and/or other materials provided with the
47
* 3. Neither the name of Guichan nor the names of its contributors may
48
* be used to endorse or promote products derived from this software
49
* without specific prior written permission.
51
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
53
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
54
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
55
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
56
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
57
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
58
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
59
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
60
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
61
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67
#include "localconsts.h"
75
* Abstract class for providing functions for user input.
77
* Guichan contains implementations of Input for common
78
* libraries like the Allegro library, the HGE library,
79
* and the SDL library.
80
* To make Guichan usable with other libraries, an Input
81
* class must be implemented.
83
* @see AllegroInput, HGEInput, OpenLayerInput,
95
* Checks if the key queue is empty, or not.
97
* @return True if the key queue is empty,
100
virtual bool isKeyQueueEmpty() A_WARN_UNUSED = 0;
103
* Dequeues the key input queue.
105
* @return The first key input in the key input queue.
107
virtual KeyInput dequeueKeyInput() = 0;
110
* Checks if the mouse queue is empyt, or not.
112
* @return True if the mouse queue is empty,
115
virtual bool isMouseQueueEmpty() A_WARN_UNUSED = 0;
118
* Dequeues the mouse input queue.
120
* @return The first mouse input in the mouse input queue.
122
virtual MouseInput dequeueMouseInput() = 0;
125
* Polls all exsisting input. Called when input should
126
* be polled. The function exists for compatibility reason
127
* where some libraries need to poll input at a certain
130
virtual void _pollInput() = 0;
134
#endif // end GCN_INPUT_HPP