Initial commit

This commit is contained in:
garrettmills
2020-05-06 00:52:12 -05:00
commit cdd8b4dc4f
23 changed files with 7804 additions and 0 deletions

41
main.cpp Normal file
View File

@@ -0,0 +1,41 @@
#include <iostream>
#include <emscripten.h>
#include <exception>
#include "src/class/Element.h"
#include "src/proc/string.cpp"
#include "src/class/EventBus.h"
#include "src/proc/event.cpp"
#include "src/proc/uuid.cpp"
extern "C" {
char* itest();
int str_pass_size();
void fire_event_bus(int key_pass);
}
void say_aye() {
printf("Arrgh mates!\n");
}
char* itest() {
Element p_tag("#foo");
p_tag.addEventListener("click", say_aye);
return "Hi, there";
}
// These are REQUIRED.
int str_pass_size() {
return cjs::str::pass_size();
}
void fire_event_bus(int string_pass) {
return cjs::event::handle_bus_fire(string_pass);
}
int main(int argc, char** argv) {
EM_ASM(InitWrappers());
printf("C++.js has initialized!\n");
return 0;
}