This repository has been archived by the owner on Nov 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflecs_dash.h
158 lines (122 loc) · 3.37 KB
/
flecs_dash.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#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