You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
773 B
42 lines
773 B
#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;
|
|
}
|