Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/Scripting/JSInterface_GUISize.h
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2020 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 9 Lines | |||||
#define INCLUDED_JSI_GUISIZE | #define INCLUDED_JSI_GUISIZE | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
namespace JSI_GUISize | namespace JSI_GUISize | ||||
{ | { | ||||
extern JSClass JSI_class; | extern JSClass JSI_class; | ||||
extern JSClassOps JSI_classops; | |||||
extern JSPropertySpec JSI_props[]; | extern JSPropertySpec JSI_props[]; | ||||
extern JSFunctionSpec JSI_methods[]; | extern JSFunctionSpec JSI_methods[]; | ||||
void RegisterScriptClass(ScriptInterface& scriptInterface); | void RegisterScriptClass(ScriptInterface& scriptInterface); | ||||
bool construct(JSContext* cx, uint argc, JS::Value* vp); | bool construct(JSContext* cx, uint argc, JS::Value* vp); | ||||
bool toString(JSContext* cx, uint argc, JS::Value* vp); | bool toString(JSContext* cx, uint argc, JS::Value* vp); | ||||
CStr ToPercentString(double pix, double per); | CStr ToPercentString(double pix, double per); | ||||
} | } | ||||
#endif // INCLUDED_JSI_GUISIZE | #endif // INCLUDED_JSI_GUISIZE |
Wildfire Games · Phabricator