added view

This commit is contained in:
Jorijn van der Graaf 2025-11-10 22:46:05 +01:00
commit 580e53d3bc
11 changed files with 68 additions and 34 deletions

View file

@ -105,6 +105,10 @@ extern "C" {
std::free(ptr);
}
__attribute__((export_name("deleteElement"))) void DeleteElement(void* ptr) {
// This will be implemented in JavaScript
}
__attribute__((export_name("ExecuteClickHandler"))) void ExecuteClickHandler(std::int32_t handlerID, double clientX, double clientY, double screenX, double screenY, std::int32_t button, std::int32_t buttons, bool altKey, bool ctrlKey, bool shiftKey, bool metaKey) {
Crafter::CppDOMBindings::clickHandlers->find(handlerID)->second(Crafter::MouseEvent(clientX, clientY, screenX, screenY, button, buttons, altKey, ctrlKey, shiftKey, metaKey));
}