|
AeonGUI
A portable video game graphic user interface library.
|
Plugin context passed to OnLoad and OnUnload. More...
#include </d/a/AeonGUI/AeonGUI/include/aeongui/PluginAPI.h>
Public Attributes | |
| AeonGUI_Document * | document |
| The document that loaded this plugin. | |
| AeonGUI_Element *(* | getElementById )(AeonGUI_Document *doc, const char *id) |
Find an element by its id attribute. | |
| void(* | addEventListener )(AeonGUI_Element *element, const char *type, AeonGUI_EventCallback callback, void *userData) |
| Register an event listener on an element. | |
| void(* | removeEventListener )(AeonGUI_Element *element, const char *type, AeonGUI_EventCallback callback, void *userData) |
| Remove a previously registered event listener. | |
| const char *(* | getAttribute )(AeonGUI_Element *element, const char *name) |
| Read an attribute value from an element. | |
| const char *(* | getEventType )(AeonGUI_Event *event) |
| Get the type string of an event. | |
| void(* | setAttribute )(AeonGUI_Element *element, const char *name, const char *value) |
| Set (or add) an attribute on an element. | |
| AeonGUI_Element *(* | querySelector )(AeonGUI_Element *element, const char *selector) |
| Find the first descendant element matching a CSS selector. | |
Plugin context passed to OnLoad and OnUnload.
Contains the document handle and function pointers for interacting with the DOM. The plugin does not need to link against AeonGUI — all calls go through these pointers.
| void(* AeonGUI_PluginContext::addEventListener) (AeonGUI_Element *element, const char *type, AeonGUI_EventCallback callback, void *userData) |
Register an event listener on an element.
| element | The target element. |
| type | Event type (e.g. "click", "mouseenter"). |
| callback | Function to call when the event fires. |
| userData | Opaque pointer forwarded to the callback. |
| const char *(* AeonGUI_PluginContext::getAttribute) (AeonGUI_Element *element, const char *name) |
Read an attribute value from an element.
| element | The element. |
| name | Attribute name. |
| AeonGUI_Element *(* AeonGUI_PluginContext::getElementById) (AeonGUI_Document *doc, const char *id) |
Find an element by its id attribute.
| doc | The document handle. |
| id | The id string to search for. |
| const char *(* AeonGUI_PluginContext::getEventType) (AeonGUI_Event *event) |
Get the type string of an event.
| event | The event handle. |
| AeonGUI_Element *(* AeonGUI_PluginContext::querySelector) (AeonGUI_Element *element, const char *selector) |
Find the first descendant element matching a CSS selector.
| element | The root element to search within. |
| selector | CSS selector string. |
| void(* AeonGUI_PluginContext::removeEventListener) (AeonGUI_Element *element, const char *type, AeonGUI_EventCallback callback, void *userData) |
Remove a previously registered event listener.
| element | The target element. |
| type | Event type. |
| callback | The callback to remove. |
| userData | The same userData used during registration. |
| void(* AeonGUI_PluginContext::setAttribute) (AeonGUI_Element *element, const char *name, const char *value) |
Set (or add) an attribute on an element.
| element | The element. |
| name | Attribute name. |
| value | New value. |