ScummVM API documentation
mouse.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
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 3 of the License, or
10 * (at your option) any later version.
11 *
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.
16 *
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/>.
19 *
20 */
21
22#ifndef AGS_ENGINE_AC_MOUSE_H
23#define AGS_ENGINE_AC_MOUSE_H
24
25#include "ags/engine/ac/dynobj/script_mouse.h"
26
27namespace AGS3 {
28
29void Mouse_SetVisible(int isOn);
30int Mouse_GetVisible();
31int Mouse_GetModeGraphic(int curs);
32void Mouse_ChangeModeView(int curs, int newview, int delay);
33void Mouse_ChangeModeView2(int curs, int newview);
34// The Mouse:: functions are static so the script doesn't pass
35// in an object parameter
36void SetMousePosition(int newx, int newy);
37int GetCursorMode();
38void SetNextCursor();
39void SetPreviousCursor();
40// permanently change cursor graphic
41void ChangeCursorGraphic(int curs, int newslot);
42void ChangeCursorHotspot(int curs, int x, int y);
43int IsButtonDown(int which);
44int IsModeEnabled(int which);
45void SetMouseBounds(int x1, int y1, int x2, int y2);
46void RefreshMouse();
47// mouse cursor functions:
48// set_mouse_cursor: changes visual appearance to specified cursor
49void set_mouse_cursor(int newcurs, bool force_update = false);
50// set_default_cursor: resets visual appearance to current mode (walk, look, etc);
51void set_default_cursor();
52// set_cursor_mode: changes mode and appearance
53void set_cursor_mode(int newmode);
54void enable_cursor_mode(int modd);
55void disable_cursor_mode(int modd);
56
57// Try to enable or disable mouse speed control by the engine
58void Mouse_EnableControl(bool on);
59void SimulateMouseClick(int button_id);
60
61//=============================================================================
62
63int GetMouseCursor();
64void update_script_mouse_coords();
65void update_inv_cursor(int invnum);
66void update_cached_mouse_cursor();
67void set_new_cursor_graphic(int spriteslot);
68int find_next_enabled_cursor(int startwith);
69int find_previous_enabled_cursor(int startwith);
70
71} // namespace AGS3
72
73#endif