OpenTTD
window_func.h
Go to the documentation of this file.
1 /* $Id: window_func.h 25681 2013-08-05 20:37:14Z michi_cc $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef WINDOW_FUNC_H
13 #define WINDOW_FUNC_H
14 
15 #include "window_type.h"
16 #include "company_type.h"
17 #include "core/geometry_type.hpp"
18 
21 void ChangeWindowOwner(Owner old_owner, Owner new_owner);
22 
23 void ResizeWindow(Window *w, int x, int y, bool clamp_to_screen = true);
28 
29 int GetMainViewTop();
30 int GetMainViewBottom();
31 
32 void InitWindowSystem();
33 void UnInitWindowSystem();
34 void ResetWindowSystem();
36 void InputLoop();
37 
38 void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0, bool gui_scope = false);
39 void InvalidateWindowClassesData(WindowClass cls, int data = 0, bool gui_scope = false);
40 
44 void HideVitalWindows();
45 void ShowVitalWindows();
46 
47 void ReInitAllWindows();
48 
49 void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, byte widget_index);
50 void SetWindowDirty(WindowClass cls, WindowNumber number);
52 
53 void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true);
55 
57 Point GetCaretPosition();
58 
59 #endif /* WINDOW_FUNC_H */