eco2d/code/vendors/flecs/flecs_dash.h

159 lines
3.4 KiB
C
Raw Normal View History

2021-01-18 16:40:47 +00:00
#define flecs_dash_STATIC
#ifndef FLECS_DASH_H
#define FLECS_DASH_H
/* This generated file contains includes for project dependencies */
/*
)
(.)
.|.
| |
_.--| |--._
.-'; ;`-'& ; `&.
\ & ; & &_/
|"""---...---"""|
\ | | | | | | | /
`---.|.|.|.---'
* This file is generated by bake.lang.c for your convenience. Headers of
* dependencies will automatically show up in this file. Include bake_config.h
* in your main project file. Do not edit! */
#ifndef FLECS_DASH_BAKE_CONFIG_H
#define FLECS_DASH_BAKE_CONFIG_H
/* Headers of public dependencies */
#include <flecs.h>
#include <flecs_meta.h>
#include <flecs_player.h>
#include <flecs_components_http.h>
#include <flecs_rest.h>
#include <flecs_monitor.h>
/* Convenience macro for exporting symbols */
#ifndef flecs_dash_STATIC
#if flecs_dash_EXPORTS && (defined(_MSC_VER) || defined(__MINGW32__))
#define FLECS_DASH_API __declspec(dllexport)
#elif flecs_dash_EXPORTS
#define FLECS_DASH_API __attribute__((__visibility__("default")))
#elif defined _MSC_VER
#define FLECS_DASH_API __declspec(dllimport)
#else
#define FLECS_DASH_API
#endif
#else
#define FLECS_DASH_API
#endif
#endif
#ifndef FLECS_DASH_MONITOR_H
#define FLECS_DASH_MONITOR_H
/* This generated file contains includes for project dependencies */
ECS_STRUCT(EcsFps, {
double value;
double count;
double target;
});
ECS_STRUCT(EcsTick, {
double count;
});
ECS_STRUCT(EcsLoad, {
double total_time_count;
double frame_time_count;
double system_time_count;
double merge_time_count;
});
ECS_STRUCT(EcsWorldClock, {
double world_time;
double world_time_raw;
});
#ifdef __cplusplus
extern "C" {
#endif
typedef struct FlecsDashMonitor {
ECS_DECLARE_COMPONENT(EcsFps);
} FlecsDashMonitor;
FLECS_DASH_API
void FlecsDashMonitorImport(
ecs_world_t *world);
#define FlecsDashMonitorImportHandles(handles)\
ECS_IMPORT_COMPONENT(handles, EcsFps);
#ifdef __cplusplus
}
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
//// Module implementation
////////////////////////////////////////////////////////////////////////////////
ECS_STRUCT(EcsDashServer, {
int16_t port;
});
ECS_STRUCT(EcsDashApp, {
char *path;
char *icon;
});
#ifdef __cplusplus
extern "C" {
#endif
typedef struct FlecsDash {
ECS_DECLARE_COMPONENT(EcsDashServer);
ECS_DECLARE_COMPONENT(EcsDashApp);
} FlecsDash;
FLECS_DASH_API
void FlecsDashImport(
ecs_world_t *world);
#define FlecsDashImportHandles(handles)\
ECS_IMPORT_COMPONENT(handles, EcsDashServer);\
ECS_IMPORT_COMPONENT(handles, EcsDashApp)
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
#ifndef FLECS_NO_CPP
namespace flecs {
class dash : public FlecsDash {
public:
using Server = EcsDashServer;
using App = EcsDashApp;
dash(flecs::world& world) {
FlecsDashImport(world.c_ptr());
flecs::module<flecs::dash>(world, "flecs::dash");
flecs::component<Server>(world, "flecs::dash::Server");
flecs::component<App>(world, "flecs::dash::App");
}
};
}
#endif // FLECS_NO_CPP
#endif // __cplusplus
#endif