Core: Modernize C headers with C++ equivalents
This commit is contained in:
@ -30,13 +30,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern int godot_audio_is_available();
|
||||
extern int godot_audio_has_worklet();
|
||||
extern int godot_audio_has_script_processor();
|
||||
|
||||
@ -32,13 +32,12 @@
|
||||
|
||||
#define WASM_EXPORT __attribute__((visibility("default")))
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Config
|
||||
extern void godot_js_config_locale_get(char *p_ptr, int p_ptr_max);
|
||||
extern void godot_js_config_canvas_id_get(char *p_ptr, int p_ptr_max);
|
||||
|
||||
@ -30,11 +30,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
extern int godot_js_webmidi_open_midi_inputs(
|
||||
void (*p_callback)(int p_size, const char **p_connected_input_names),
|
||||
void (*p_on_midi_message)(int p_device_index, int p_status, const uint8_t *p_data, int p_data_len),
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef enum {
|
||||
GODOT_JS_FETCH_STATE_REQUESTING = 0,
|
||||
GODOT_JS_FETCH_STATE_BODY = 1,
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <emscripten.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
void OS_Web::alert(const String &p_alert, const String &p_title) {
|
||||
godot_js_display_alert(p_alert.utf8().get_data());
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#include <emscripten/emscripten.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
static OS_Web *os = nullptr;
|
||||
#ifndef PROXY_TO_PTHREAD_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user