ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
27 namespace AGS3 {
28 
29 void Mouse_SetVisible(int isOn);
30 int Mouse_GetVisible();
31 int Mouse_GetModeGraphic(int curs);
32 void Mouse_ChangeModeView(int curs, int newview, int delay);
33 void Mouse_ChangeModeView2(int curs, int newview);
34 // The Mouse:: functions are static so the script doesn't pass
35 // in an object parameter
36 void SetMousePosition(int newx, int newy);
37 int GetCursorMode();
38 void SetNextCursor();
39 void SetPreviousCursor();
40 // permanently change cursor graphic
41 void ChangeCursorGraphic(int curs, int newslot);
42 void ChangeCursorHotspot(int curs, int x, int y);
43 int IsButtonDown(int which);
44 int IsModeEnabled(int which);
45 void SetMouseBounds(int x1, int y1, int x2, int y2);
46 void RefreshMouse();
47 // mouse cursor functions:
48 // set_mouse_cursor: changes visual appearance to specified cursor
49 void set_mouse_cursor(int newcurs, bool force_update = false);
50 // set_default_cursor: resets visual appearance to current mode (walk, look, etc);
51 void set_default_cursor();
52 // set_cursor_mode: changes mode and appearance
53 void set_cursor_mode(int newmode);
54 void enable_cursor_mode(int modd);
55 void disable_cursor_mode(int modd);
56 
57 // Try to enable or disable mouse speed control by the engine
58 void Mouse_EnableControl(bool on);
59 void SimulateMouseClick(int button_id);
60 
61 //=============================================================================
62 
63 int GetMouseCursor();
64 void update_script_mouse_coords();
65 void update_inv_cursor(int invnum);
66 void update_cached_mouse_cursor();
67 void set_new_cursor_graphic(int spriteslot);
68 int find_next_enabled_cursor(int startwith);
69 int find_previous_enabled_cursor(int startwith);
70 
71 } // namespace AGS3
72 
73 #endif
Definition: ags.h:40