ScummVM API documentation
gui.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_GUI_H
23 #define AGS_ENGINE_AC_GUI_H
24 
25 #include "ags/engine/ac/dynobj/script_gui.h"
26 #include "ags/shared/gui/gui_main.h"
27 
28 namespace AGS3 {
29 
30 using AGS::Shared::GUIMain;
31 using AGS::Shared::GUIObject;
32 
33 ScriptGUI *GUI_AsTextWindow(ScriptGUI *tehgui);
34 int GUI_GetPopupStyle(ScriptGUI *tehgui);
35 void GUI_SetVisible(ScriptGUI *tehgui, int isvisible);
36 int GUI_GetVisible(ScriptGUI *tehgui);
37 int GUI_GetX(ScriptGUI *tehgui);
38 void GUI_SetX(ScriptGUI *tehgui, int xx);
39 int GUI_GetY(ScriptGUI *tehgui);
40 void GUI_SetY(ScriptGUI *tehgui, int yy);
41 void GUI_SetPosition(ScriptGUI *tehgui, int xx, int yy);
42 void GUI_SetSize(ScriptGUI *sgui, int widd, int hitt);
43 int GUI_GetWidth(ScriptGUI *sgui);
44 int GUI_GetHeight(ScriptGUI *sgui);
45 void GUI_SetWidth(ScriptGUI *sgui, int newwid);
46 void GUI_SetHeight(ScriptGUI *sgui, int newhit);
47 void GUI_SetZOrder(ScriptGUI *tehgui, int z);
48 int GUI_GetZOrder(ScriptGUI *tehgui);
49 void GUI_SetClickable(ScriptGUI *tehgui, int clickable);
50 int GUI_GetClickable(ScriptGUI *tehgui);
51 int GUI_GetID(ScriptGUI *tehgui);
52 GUIObject *GUI_GetiControls(ScriptGUI *tehgui, int idx);
53 int GUI_GetControlCount(ScriptGUI *tehgui);
54 void GUI_SetPopupYPos(ScriptGUI *tehgui, int newpos);
55 int GUI_GetPopupYPos(ScriptGUI *tehgui);
56 void GUI_SetTransparency(ScriptGUI *tehgui, int trans);
57 int GUI_GetTransparency(ScriptGUI *tehgui);
58 void GUI_Centre(ScriptGUI *sgui);
59 void GUI_SetBackgroundGraphic(ScriptGUI *tehgui, int slotn);
60 int GUI_GetBackgroundGraphic(ScriptGUI *tehgui);
61 void GUI_SetBackgroundColor(ScriptGUI *tehgui, int newcol);
62 int GUI_GetBackgroundColor(ScriptGUI *tehgui);
63 void GUI_SetBorderColor(ScriptGUI *tehgui, int newcol);
64 int GUI_GetBorderColor(ScriptGUI *tehgui);
65 void GUI_SetTextColor(ScriptGUI *tehgui, int newcol);
66 int GUI_GetTextColor(ScriptGUI *tehgui);
67 void GUI_SetTextPadding(ScriptGUI *tehgui, int newpos);
68 int GUI_GetTextPadding(ScriptGUI *tehgui);
69 ScriptGUI *GetGUIAtLocation(int xx, int yy);
70 
71 void remove_popup_interface(int ifacenum);
72 void process_interface_click(int ifce, int btn, int mbut);
73 void replace_macro_tokens(const char *text, AGS::Shared::String &fixed_text);
74 void update_gui_zorder();
75 void export_gui_controls(int ee);
76 void unexport_gui_controls(int ee);
77 void update_gui_disabled_status();
78 int adjust_x_for_guis(int x, int y, bool assume_blocking = false);
79 int adjust_y_for_guis(int y, bool assume_blocking = false);
80 
81 int gui_get_interactable(int x, int y);
82 int gui_on_mouse_move(const int mx, const int my);
83 void gui_on_mouse_hold(const int wasongui, const int wasbutdown);
84 void gui_on_mouse_up(const int wasongui, const int wasbutdown, const int mx, const int my);
85 void gui_on_mouse_down(const int guin, const int mbut, const int mx, const int my);
86 
87 } // namespace AGS3
88 
89 #endif
Definition: ags.h:40