2007-12-19 19:44:29 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-01-18 03:48:29 +00:00
|
|
|
/** @file window_func.h Window functions not directly related to making/drawing windows. */
|
2007-12-19 19:44:29 +00:00
|
|
|
|
|
|
|
#ifndef WINDOW_FUNC_H
|
|
|
|
#define WINDOW_FUNC_H
|
|
|
|
|
|
|
|
#include "window_type.h"
|
2008-09-30 20:51:04 +00:00
|
|
|
#include "company_type.h"
|
2007-12-19 19:44:29 +00:00
|
|
|
|
|
|
|
Window *FindWindowById(WindowClass cls, WindowNumber number);
|
2009-11-29 00:41:08 +00:00
|
|
|
Window *FindWindowByClass(WindowClass cls);
|
2008-09-30 20:39:50 +00:00
|
|
|
void ChangeWindowOwner(Owner old_owner, Owner new_owner);
|
2007-12-19 19:44:29 +00:00
|
|
|
|
|
|
|
void ResizeWindow(Window *w, int x, int y);
|
2007-12-19 20:45:46 +00:00
|
|
|
int PositionMainToolbar(Window *w);
|
2007-12-19 19:44:29 +00:00
|
|
|
|
2009-11-07 17:24:04 +00:00
|
|
|
int GetMainViewTop();
|
|
|
|
int GetMainViewBottom();
|
|
|
|
|
2007-12-19 19:44:29 +00:00
|
|
|
void InitWindowSystem();
|
|
|
|
void UnInitWindowSystem();
|
|
|
|
void ResetWindowSystem();
|
2009-02-09 02:57:15 +00:00
|
|
|
void SetupColoursAndInitialWindow();
|
2007-12-19 19:44:29 +00:00
|
|
|
void InputLoop();
|
2008-05-10 12:30:27 +00:00
|
|
|
|
|
|
|
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0);
|
|
|
|
void InvalidateWindowClassesData(WindowClass cls, int data = 0);
|
2007-12-19 19:44:29 +00:00
|
|
|
|
|
|
|
void DeleteNonVitalWindows();
|
|
|
|
void DeleteAllNonVitalWindows();
|
2009-02-04 16:59:41 +00:00
|
|
|
void DeleteConstructionWindows();
|
2007-12-19 19:44:29 +00:00
|
|
|
void HideVitalWindows();
|
|
|
|
void ShowVitalWindows();
|
|
|
|
|
2009-06-28 20:09:40 +00:00
|
|
|
void ReInitAllWindows();
|
|
|
|
|
2009-09-13 19:15:59 +00:00
|
|
|
void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, byte widget_index);
|
|
|
|
void SetWindowDirty(WindowClass cls, WindowNumber number);
|
|
|
|
void SetWindowClassesDirty(WindowClass cls);
|
2008-05-10 12:30:27 +00:00
|
|
|
|
2009-01-02 20:59:04 +00:00
|
|
|
void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true);
|
2007-12-25 11:26:07 +00:00
|
|
|
void DeleteWindowByClass(WindowClass cls);
|
|
|
|
|
2007-12-19 19:44:29 +00:00
|
|
|
#endif /* WINDOW_FUNC_H */
|