20#ifndef AEONGUI_SVGSCRIPTELEMENT_H
21#define AEONGUI_SVGSCRIPTELEMENT_H
26#include "SVGElement.hpp"
33 class CallbackEventListener;
81 std::vector<std::string> BuildLibraryPaths (
const std::string& aHref )
const;
86 void LoadLibrary (
const std::string& aPath );
95 static const char* API_getAttribute (
AeonGUI_Element* element,
const char* name );
96 static void API_setAttribute (
AeonGUI_Element* element,
const char* name,
const char* value );
100 void* mLibHandle {
nullptr};
106 struct RegisteredCallback
109 std::string eventType;
110 std::unique_ptr<CallbackEventListener> listener;
112 std::vector<RegisteredCallback> mCallbacks;
C API for AeonGUI native plugins.
void(* AeonGUI_OnLoadFunc)(AeonGUI_PluginContext *ctx)
Plugin entry point — called after the document is loaded.
Definition PluginAPI.h:152
struct AeonGUI_Document_s AeonGUI_Document
Opaque handle to a Document.
Definition PluginAPI.h:67
struct AeonGUI_Element_s AeonGUI_Element
Opaque handle to an Element.
Definition PluginAPI.h:69
struct AeonGUI_Event_s AeonGUI_Event
Opaque handle to an Event.
Definition PluginAPI.h:71
void(* AeonGUI_EventCallback)(AeonGUI_Event *event, void *userData)
Callback type for event listeners.
Definition PluginAPI.h:77
void(* AeonGUI_OnUnloadFunc)(AeonGUI_PluginContext *ctx)
Plugin cleanup — called before the document is unloaded.
Definition PluginAPI.h:162
Base class for DOM elements.
Definition Element.hpp:46
Base class for all nodes in the DOM tree.
Definition Node.hpp:42
SVGElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGElement.
Definition SVGElement.cpp:22
void OnLoad() override
Called after document load — loads the native plugin.
Definition SVGScriptElement.cpp:216
SVGScriptElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGScriptElement.
Definition SVGScriptElement.cpp:102
~SVGScriptElement() override
Destructor. Unloads the plugin if loaded.
Definition SVGScriptElement.cpp:107
void OnUnload() override
Called before document unload — unloads the native plugin.
Definition SVGScriptElement.cpp:297
bool IsDrawEnabled() const override
Not drawable.
Definition SVGScriptElement.cpp:112
Plugin context passed to OnLoad and OnUnload.
Definition PluginAPI.h:87