2023-05-23 19:01:39 +02:00
|
|
|
/*************************************************************************/
|
2023-10-23 14:41:55 +02:00
|
|
|
/* pandemonium_global.h */
|
2023-05-23 19:01:39 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
2023-10-23 14:07:57 +02:00
|
|
|
/* PANDEMONIUM ENGINE */
|
|
|
|
/* https://pandemoniumengine.org */
|
2023-05-23 19:01:39 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
|
2023-10-23 14:07:57 +02:00
|
|
|
/* Copyright (c) 2014-2022 Pandemonium Engine contributors (cf. AUTHORS.md). */
|
2023-05-23 19:01:39 +02:00
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2023-10-23 15:35:24 +02:00
|
|
|
#ifndef PANDEMONIUM_GLOBAL_H
|
|
|
|
#define PANDEMONIUM_GLOBAL_H
|
2023-05-23 19:01:39 +02:00
|
|
|
|
2023-05-31 15:03:53 +02:00
|
|
|
#include <gdnative_api_struct.gen.h>
|
|
|
|
|
2023-10-23 14:41:55 +02:00
|
|
|
#include "array.h"
|
|
|
|
#include "ustring.h"
|
2023-05-23 19:01:39 +02:00
|
|
|
|
2023-05-31 15:03:53 +02:00
|
|
|
class Array;
|
|
|
|
class String;
|
|
|
|
|
2023-10-23 14:07:57 +02:00
|
|
|
class Pandemonium {
|
2023-05-23 19:01:39 +02:00
|
|
|
public:
|
|
|
|
static void print(const String &message);
|
|
|
|
static void print_warning(const String &description, const String &function, const String &file, int line);
|
|
|
|
static void print_error(const String &description, const String &function, const String &file, int line);
|
|
|
|
|
2023-05-31 13:31:45 +02:00
|
|
|
static void gdnative_init(pandemonium_gdnative_init_options *o);
|
|
|
|
static void gdnative_terminate(pandemonium_gdnative_terminate_options *o);
|
2023-05-23 19:01:39 +02:00
|
|
|
static void nativescript_init(void *handle);
|
|
|
|
static void nativescript_terminate(void *handle);
|
|
|
|
|
|
|
|
static void gdnative_profiling_add_data(const char *p_signature, uint64_t p_time);
|
|
|
|
|
|
|
|
template <class... Args>
|
|
|
|
static void print(const String &fmt, Args... values) {
|
|
|
|
print(fmt.format(Array::make(values...)));
|
|
|
|
}
|
2023-10-23 17:11:10 +02:00
|
|
|
|
|
|
|
static const pandemonium_gdnative_core_api_struct *api;
|
|
|
|
|
|
|
|
static const pandemonium_gdnative_ext_nativescript_api_struct *nativescript_api;
|
|
|
|
static const pandemonium_gdnative_ext_pluginscript_api_struct *pluginscript_api;
|
|
|
|
static const pandemonium_gdnative_ext_android_api_struct *android_api;
|
|
|
|
static const pandemonium_gdnative_ext_videodecoder_api_struct *videodecoder_api;
|
|
|
|
static const pandemonium_gdnative_ext_net_api_struct *net_api;
|
|
|
|
|
|
|
|
static const void *gdnlib;
|
2023-05-23 19:01:39 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RegisterState {
|
|
|
|
static void *nativescript_handle;
|
|
|
|
static int language_index;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|