2021-05-14 03:18:03 -07:00
|
|
|
|
/* Copyright (C) 2021 Wildfire Games.
|
2023-07-27 13:54:46 -07:00
|
|
|
|
* This file is part of 0 A.D.
|
2009-04-18 10:00:33 -07:00
|
|
|
|
*
|
2023-07-27 13:54:46 -07:00
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
2009-04-18 10:00:33 -07:00
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
|
*
|
2023-07-27 13:54:46 -07:00
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
2009-04-18 10:00:33 -07:00
|
|
|
|
* 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
|
2023-07-27 13:54:46 -07:00
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
2009-04-18 10:00:33 -07:00
|
|
|
|
*/
|
|
|
|
|
|
|
2019-09-30 01:19:56 -07:00
|
|
|
|
#ifndef INCLUDED_JSI_GUISIZE
|
|
|
|
|
|
#define INCLUDED_JSI_GUISIZE
|
2004-07-08 08:23:47 -07:00
|
|
|
|
|
2021-05-15 07:50:24 -07:00
|
|
|
|
#include "ps/CStr.h"
|
|
|
|
|
|
#include "scriptinterface/ScriptForward.h"
|
|
|
|
|
|
#include "scriptinterface/ScriptTypes.h"
|
2018-04-27 09:48:44 -07:00
|
|
|
|
|
2019-09-30 01:19:56 -07:00
|
|
|
|
namespace JSI_GUISize
|
|
|
|
|
|
{
|
|
|
|
|
|
extern JSClass JSI_class;
|
2020-11-18 06:39:04 -08:00
|
|
|
|
extern JSClassOps JSI_classops;
|
2019-09-30 01:19:56 -07:00
|
|
|
|
extern JSPropertySpec JSI_props[];
|
|
|
|
|
|
extern JSFunctionSpec JSI_methods[];
|
2004-07-08 08:23:47 -07:00
|
|
|
|
|
2019-09-30 01:19:56 -07:00
|
|
|
|
void RegisterScriptClass(ScriptInterface& scriptInterface);
|
2004-07-08 08:23:47 -07:00
|
|
|
|
|
2019-09-30 01:19:56 -07:00
|
|
|
|
bool construct(JSContext* cx, uint argc, JS::Value* vp);
|
|
|
|
|
|
bool toString(JSContext* cx, uint argc, JS::Value* vp);
|
2004-07-08 08:23:47 -07:00
|
|
|
|
|
2021-05-15 07:50:24 -07:00
|
|
|
|
CStr ToPercentString(double pix, double per);
|
2004-07-08 08:23:47 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-09-30 01:19:56 -07:00
|
|
|
|
#endif // INCLUDED_JSI_GUISIZE
|