Changeset View
Changeset View
Standalone View
Standalone View
source/gui/Scripting/JSInterface_GUIProxy.h
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2022 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 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | protected: | ||||
// Handler for `delete object.x;` | // Handler for `delete object.x;` | ||||
virtual bool delete_(JSContext* cx, JS::HandleObject proxy, JS::HandleId id, JS::ObjectOpResult& result) const override final; | virtual bool delete_(JSContext* cx, JS::HandleObject proxy, JS::HandleId id, JS::ObjectOpResult& result) const override final; | ||||
// The following methods are not provided by BaseProxyHandler. | // The following methods are not provided by BaseProxyHandler. | ||||
// We provide defaults that do nothing (some raise JS exceptions). | // We provide defaults that do nothing (some raise JS exceptions). | ||||
// The JS code will see undefined when querying a property descriptor. | // The JS code will see undefined when querying a property descriptor. | ||||
virtual bool getOwnPropertyDescriptor(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id), | virtual bool getOwnPropertyDescriptor(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id), | ||||
JS::MutableHandle<JS::PropertyDescriptor> UNUSED(desc)) const override | JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>> desc) const override | ||||
nwtourUnsubmitted Not Done Inline Actionsnwtour: ```
In file included from ../../../source/gui/ObjectBases/IGUIObject.cpp:25:
../../.. | |||||
{ | { | ||||
return true; | return true; | ||||
} | } | ||||
// Throw an exception is JS code attempts defining a property. | // Throw an exception is JS code attempts defining a property. | ||||
virtual bool defineProperty(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id), | virtual bool defineProperty(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::HandleId UNUSED(id), | ||||
JS::Handle<JS::PropertyDescriptor> UNUSED(desc), JS::ObjectOpResult& UNUSED(result)) const override | JS::Handle<JS::PropertyDescriptor> UNUSED(desc), JS::ObjectOpResult& UNUSED(result)) const override | ||||
{ | { | ||||
return false; | return false; | ||||
} | } | ||||
// No accessible properties. | // No accessible properties. | ||||
virtual bool ownPropertyKeys(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::MutableHandleIdVector UNUSED(props)) const override | virtual bool ownPropertyKeys(JSContext* UNUSED(cx), JS::HandleObject UNUSED(proxy), JS::MutableHandleIdVector UNUSED(props)) const override | ||||
{ | { | ||||
return true; | return true; | ||||
} | } | ||||
Show All 35 Lines |
Wildfire Games · Phabricator