From 63b1a096eb17fd52cd46c36177e5158dce54a60a Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Thu, 16 Nov 2017 01:33:48 +0100 Subject: Facilitate exposing platform-exclusive interfaces to all platforms This makes the interfaces available, without implementation, in other platforms and the editor, which facilitates documenting platform-exclusive classes. Platform-exclusive APIs must be set up in platform//api/api.cpp. Provide noop method-implementations where necessary. Also setup and document the HTML5 platform's JavaScript singleton. --- platform/javascript/api/api.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 platform/javascript/api/api.h (limited to 'platform/javascript/api/api.h') diff --git a/platform/javascript/api/api.h b/platform/javascript/api/api.h new file mode 100644 index 0000000000..53cd9239fc --- /dev/null +++ b/platform/javascript/api/api.h @@ -0,0 +1,31 @@ +/*************************************************************************/ +/* api.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_javascript_api(); +void unregister_javascript_api(); -- cgit v1.2.3