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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef AGS_ENGINE_AC_GUI_H 24 #define AGS_ENGINE_AC_GUI_H 25 26 #include "ags/engine/ac/dynobj/script_gui.h" 27 #include "ags/shared/gui/gui_main.h" 28 29 namespace AGS3 { 30 31 using AGS::Shared::GUIMain; 32 using AGS::Shared::GUIObject; 33 34 ScriptGUI *GUI_AsTextWindow(ScriptGUI *tehgui); 35 int GUI_GetPopupStyle(ScriptGUI *tehgui); 36 void GUI_SetVisible(ScriptGUI *tehgui, int isvisible); 37 int GUI_GetVisible(ScriptGUI *tehgui); 38 int GUI_GetX(ScriptGUI *tehgui); 39 void GUI_SetX(ScriptGUI *tehgui, int xx); 40 int GUI_GetY(ScriptGUI *tehgui); 41 void GUI_SetY(ScriptGUI *tehgui, int yy); 42 void GUI_SetPosition(ScriptGUI *tehgui, int xx, int yy); 43 void GUI_SetSize(ScriptGUI *sgui, int widd, int hitt); 44 int GUI_GetWidth(ScriptGUI *sgui); 45 int GUI_GetHeight(ScriptGUI *sgui); 46 void GUI_SetWidth(ScriptGUI *sgui, int newwid); 47 void GUI_SetHeight(ScriptGUI *sgui, int newhit); 48 void GUI_SetZOrder(ScriptGUI *tehgui, int z); 49 int GUI_GetZOrder(ScriptGUI *tehgui); 50 void GUI_SetClickable(ScriptGUI *tehgui, int clickable); 51 int GUI_GetClickable(ScriptGUI *tehgui); 52 int GUI_GetID(ScriptGUI *tehgui); 53 GUIObject *GUI_GetiControls(ScriptGUI *tehgui, int idx); 54 int GUI_GetControlCount(ScriptGUI *tehgui); 55 void GUI_SetPopupYPos(ScriptGUI *tehgui, int newpos); 56 int GUI_GetPopupYPos(ScriptGUI *tehgui); 57 void GUI_SetTransparency(ScriptGUI *tehgui, int trans); 58 int GUI_GetTransparency(ScriptGUI *tehgui); 59 void GUI_Centre(ScriptGUI *sgui); 60 void GUI_SetBackgroundGraphic(ScriptGUI *tehgui, int slotn); 61 int GUI_GetBackgroundGraphic(ScriptGUI *tehgui); 62 void GUI_SetBackgroundColor(ScriptGUI *tehgui, int newcol); 63 int GUI_GetBackgroundColor(ScriptGUI *tehgui); 64 void GUI_SetBorderColor(ScriptGUI *tehgui, int newcol); 65 int GUI_GetBorderColor(ScriptGUI *tehgui); 66 void GUI_SetTextColor(ScriptGUI *tehgui, int newcol); 67 int GUI_GetTextColor(ScriptGUI *tehgui); 68 void GUI_SetTextPadding(ScriptGUI *tehgui, int newpos); 69 int GUI_GetTextPadding(ScriptGUI *tehgui); 70 ScriptGUI *GetGUIAtLocation(int xx, int yy); 71 72 void remove_popup_interface(int ifacenum); 73 void process_interface_click(int ifce, int btn, int mbut); 74 void replace_macro_tokens(const char *text, AGS::Shared::String &fixed_text); 75 void update_gui_zorder(); 76 void export_gui_controls(int ee); 77 void unexport_gui_controls(int ee); 78 int convert_gui_disabled_style(int oldStyle); 79 void update_gui_disabled_status(); 80 int adjust_x_for_guis(int xx, int yy); 81 int adjust_y_for_guis(int yy); 82 void recreate_guibg_image(GUIMain *tehgui); 83 84 int gui_get_interactable(int x, int y); 85 int gui_on_mouse_move(); 86 void gui_on_mouse_hold(const int wasongui, const int wasbutdown); 87 void gui_on_mouse_up(const int wasongui, const int wasbutdown); 88 void gui_on_mouse_down(const int guin, const int mbut); 89 90 } // namespace AGS3 91 92 #endif 93