libgpac
Documentation of the core library of GPAC
|
Scenegraph for SVG files. More...
Data Structures | |
struct | GF_DOMAttribute |
struct | GF_DOMFullAttribute |
struct | GF_DOMNode |
struct | GF_DOMFullNode |
struct | GF_DOMText |
struct | GF_DOMUpdates |
struct | GF_DOMEventTarget |
struct | GF_DOMMediaEvent |
struct | GF_DOM_Event |
struct | GF_DOMHandler |
struct | SVGPropertiesPointers |
Macros | |
#define | GF_DOM_BASE_ATTRIBUTE |
#define | GF_DOM_FULL_ATTRIBUTE GF_DOM_ATTRIBUTE \ |
#define | GF_DOM_BASE_NODE |
#define | GF_DOM_BASE_LISTENER |
Typedefs | |
typedef struct _smil_timing_rti | SMIL_Timing_RTI |
typedef void | gf_sg_smil_evaluate(struct _smil_timing_rti *rti, Fixed normalized_simple_time, GF_SGSMILTimingEvalState state) |
typedef struct __dom_base_attribute | SVGAttribute |
typedef struct __dom_full_attribute | SVGExtendedAttribute |
typedef struct __dom_base_node | SVG_Element |
typedef struct __xml_ev_handler | SVG_handlerElement |
typedef struct _all_atts | SVGAllAttributes |
Enumerations | |
enum | { TAG_DOM_ATTRIBUTE_NULL , TAG_DOM_ATT_any , TAG_XML_ATT_RANGE_FIRST , TAG_XML_ATT_id = TAG_XML_ATT_RANGE_FIRST , TAG_XML_ATT_base , TAG_XML_ATT_lang , TAG_XML_ATT_space , TAG_XML_ATT_RANGE_LAST , TAG_XLINK_ATT_RANGE_FIRST , TAG_XLINK_ATT_type = TAG_XLINK_ATT_RANGE_FIRST , TAG_XLINK_ATT_role , TAG_XLINK_ATT_arcrole , TAG_XLINK_ATT_title , TAG_XLINK_ATT_href , TAG_XLINK_ATT_show , TAG_XLINK_ATT_actuate , TAG_XLINK_ATT_RANGE_LAST , TAG_XMLEV_ATT_RANGE_FIRST , TAG_XMLEV_ATT_event , TAG_XMLEV_ATT_phase , TAG_XMLEV_ATT_propagate , TAG_XMLEV_ATT_defaultAction , TAG_XMLEV_ATT_observer , TAG_XMLEV_ATT_target , TAG_XMLEV_ATT_handler , TAG_XMLEV_ATT_RANGE_LAST , TAG_LSR_ATT_RANGE_FIRST , TAG_LSR_ATT_enabled , TAG_LSR_ATT_RANGE_LAST , TAG_LSR_ATT_children , TAG_LSR_ATT_overflow , TAG_LSR_ATT_rotation , TAG_LSR_ATT_scale , TAG_LSR_ATT_translation , TAG_LSR_ATT_svg_width , TAG_LSR_ATT_svg_height , TAG_LSR_ATT_textContent , TAG_LSR_ATT_text_display , TAG_SVG_ATT_RANGE_FIRST , TAG_SVG_ATT_id = TAG_SVG_ATT_RANGE_FIRST , TAG_SVG_ATT__class , TAG_SVG_ATT_requiredFeatures , TAG_SVG_ATT_requiredExtensions , TAG_SVG_ATT_requiredFormats , TAG_SVG_ATT_requiredFonts , TAG_SVG_ATT_systemLanguage , TAG_SVG_ATT_display , TAG_SVG_ATT_visibility , TAG_SVG_ATT_image_rendering , TAG_SVG_ATT_pointer_events , TAG_SVG_ATT_shape_rendering , TAG_SVG_ATT_text_rendering , TAG_SVG_ATT_audio_level , TAG_SVG_ATT_viewport_fill , TAG_SVG_ATT_viewport_fill_opacity , TAG_SVG_ATT_overflow , TAG_SVG_ATT_fill_opacity , TAG_SVG_ATT_stroke_opacity , TAG_SVG_ATT_fill , TAG_SVG_ATT_fill_rule , TAG_SVG_ATT_filter , TAG_SVG_ATT_stroke , TAG_SVG_ATT_stroke_dasharray , TAG_SVG_ATT_stroke_dashoffset , TAG_SVG_ATT_stroke_linecap , TAG_SVG_ATT_stroke_linejoin , TAG_SVG_ATT_stroke_miterlimit , TAG_SVG_ATT_stroke_width , TAG_SVG_ATT_color , TAG_SVG_ATT_color_rendering , TAG_SVG_ATT_vector_effect , TAG_SVG_ATT_solid_color , TAG_SVG_ATT_solid_opacity , TAG_SVG_ATT_display_align , TAG_SVG_ATT_line_increment , TAG_SVG_ATT_stop_color , TAG_SVG_ATT_stop_opacity , TAG_SVG_ATT_font_family , TAG_SVG_ATT_font_size , TAG_SVG_ATT_font_style , TAG_SVG_ATT_font_variant , TAG_SVG_ATT_font_weight , TAG_SVG_ATT_text_anchor , TAG_SVG_ATT_text_align , TAG_SVG_ATT_text_decoration , TAG_SVG_ATT_focusHighlight , TAG_SVG_ATT_externalResourcesRequired , TAG_SVG_ATT_focusable , TAG_SVG_ATT_nav_next , TAG_SVG_ATT_nav_prev , TAG_SVG_ATT_nav_up , TAG_SVG_ATT_nav_up_right , TAG_SVG_ATT_nav_right , TAG_SVG_ATT_nav_down_right , TAG_SVG_ATT_nav_down , TAG_SVG_ATT_nav_down_left , TAG_SVG_ATT_nav_left , TAG_SVG_ATT_nav_up_left , TAG_SVG_ATT_transform , TAG_SVG_ATT_target , TAG_SVG_ATT_attributeName , TAG_SVG_ATT_attributeType , TAG_SVG_ATT_begin , TAG_SVG_ATT_dur , TAG_SVG_ATT_end , TAG_SVG_ATT_repeatCount , TAG_SVG_ATT_repeatDur , TAG_SVG_ATT_restart , TAG_SVG_ATT_smil_fill , TAG_SVG_ATT_min , TAG_SVG_ATT_max , TAG_SVG_ATT_to , TAG_SVG_ATT_calcMode , TAG_SVG_ATT_values , TAG_SVG_ATT_keyTimes , TAG_SVG_ATT_keySplines , TAG_SVG_ATT_from , TAG_SVG_ATT_by , TAG_SVG_ATT_additive , TAG_SVG_ATT_accumulate , TAG_SVG_ATT_path , TAG_SVG_ATT_keyPoints , TAG_SVG_ATT_rotate , TAG_SVG_ATT_origin , TAG_SVG_ATT_transform_type , TAG_SVG_ATT_clipBegin , TAG_SVG_ATT_clipEnd , TAG_SVG_ATT_syncBehavior , TAG_SVG_ATT_syncTolerance , TAG_SVG_ATT_syncMaster , TAG_SVG_ATT_syncReference , TAG_SVG_ATT_x , TAG_SVG_ATT_y , TAG_SVG_ATT_width , TAG_SVG_ATT_height , TAG_SVG_ATT_preserveAspectRatio , TAG_SVG_ATT_initialVisibility , TAG_SVG_ATT_type , TAG_SVG_ATT_cx , TAG_SVG_ATT_cy , TAG_SVG_ATT_r , TAG_SVG_ATT_cursorManager_x , TAG_SVG_ATT_cursorManager_y , TAG_SVG_ATT_rx , TAG_SVG_ATT_ry , TAG_SVG_ATT_horiz_adv_x , TAG_SVG_ATT_horiz_origin_x , TAG_SVG_ATT_font_stretch , TAG_SVG_ATT_unicode_range , TAG_SVG_ATT_panose_1 , TAG_SVG_ATT_widths , TAG_SVG_ATT_bbox , TAG_SVG_ATT_units_per_em , TAG_SVG_ATT_stemv , TAG_SVG_ATT_stemh , TAG_SVG_ATT_slope , TAG_SVG_ATT_cap_height , TAG_SVG_ATT_x_height , TAG_SVG_ATT_accent_height , TAG_SVG_ATT_ascent , TAG_SVG_ATT_descent , TAG_SVG_ATT_ideographic , TAG_SVG_ATT_alphabetic , TAG_SVG_ATT_mathematical , TAG_SVG_ATT_hanging , TAG_SVG_ATT_underline_position , TAG_SVG_ATT_underline_thickness , TAG_SVG_ATT_strikethrough_position , TAG_SVG_ATT_strikethrough_thickness , TAG_SVG_ATT_overline_position , TAG_SVG_ATT_overline_thickness , TAG_SVG_ATT_d , TAG_SVG_ATT_unicode , TAG_SVG_ATT_glyph_name , TAG_SVG_ATT_arabic_form , TAG_SVG_ATT_lang , TAG_SVG_ATT_u1 , TAG_SVG_ATT_g1 , TAG_SVG_ATT_u2 , TAG_SVG_ATT_g2 , TAG_SVG_ATT_k , TAG_SVG_ATT_opacity , TAG_SVG_ATT_x1 , TAG_SVG_ATT_y1 , TAG_SVG_ATT_x2 , TAG_SVG_ATT_y2 , TAG_SVG_ATT_filterUnits , TAG_SVG_ATT_gradientUnits , TAG_SVG_ATT_spreadMethod , TAG_SVG_ATT_gradientTransform , TAG_SVG_ATT_pathLength , TAG_SVG_ATT_points , TAG_SVG_ATT_mediaSize , TAG_SVG_ATT_mediaTime , TAG_SVG_ATT_mediaCharacterEncoding , TAG_SVG_ATT_mediaContentEncodings , TAG_SVG_ATT_bandwidth , TAG_SVG_ATT_fx , TAG_SVG_ATT_fy , TAG_SVG_ATT_size , TAG_SVG_ATT_choice , TAG_SVG_ATT_delta , TAG_SVG_ATT_offset , TAG_SVG_ATT_syncBehaviorDefault , TAG_SVG_ATT_syncToleranceDefault , TAG_SVG_ATT_viewBox , TAG_SVG_ATT_zoomAndPan , TAG_SVG_ATT_version , TAG_SVG_ATT_baseProfile , TAG_SVG_ATT_contentScriptType , TAG_SVG_ATT_snapshotTime , TAG_SVG_ATT_timelineBegin , TAG_SVG_ATT_playbackOrder , TAG_SVG_ATT_editable , TAG_SVG_ATT_text_x , TAG_SVG_ATT_text_y , TAG_SVG_ATT_text_rotate , TAG_SVG_ATT_transformBehavior , TAG_SVG_ATT_overlay , TAG_SVG_ATT_fullscreen , TAG_SVG_ATT_motionTransform , TAG_SVG_ATT_clip_path , TAG_SVG_ATT_filter_transfer_type , TAG_SVG_ATT_filter_table_values , TAG_SVG_ATT_filter_intercept , TAG_SVG_ATT_filter_amplitude , TAG_SVG_ATT_filter_exponent , TAG_GSVG_ATT_useAsPrimary , TAG_GSVG_ATT_depthOffset , TAG_GSVG_ATT_depthGain } |
enum | GF_NamespaceType { GF_XMLNS_UNDEFINED = 0 , GF_XMLNS_XML , GF_XMLNS_XLINK , GF_XMLNS_XMLEV , GF_XMLNS_LASER , GF_XMLNS_SVG , GF_XMLNS_XBL , GF_XMLNS_SVG_GPAC_EXTENSION } |
enum | { GF_DOM_TEXT_REGULAR = 0 , GF_DOM_TEXT_CDATA , GF_DOM_TEXT_INSERTED } |
enum | GF_DOMEventPhase { GF_DOM_EVENT_PHASE_CAPTURE = 1 , GF_DOM_EVENT_PHASE_AT_TARGET = 2 , GF_DOM_EVENT_PHASE_BUBBLE = 3 , GF_DOM_EVENT_CANCEL_MASK = 0xE0 , GF_DOM_EVENT_PHASE_CANCEL = 1<<5 , GF_DOM_EVENT_PHASE_CANCEL_ALL = 1<<6 , GF_DOM_EVENT_PHASE_PREVENT = 1<<7 } |
enum | GF_DOMEventTargetType { GF_DOM_EVENT_TARGET_NODE , GF_DOM_EVENT_TARGET_DOCUMENT , GF_DOM_EVENT_TARGET_MSE_MEDIASOURCE , GF_DOM_EVENT_TARGET_MSE_SOURCEBUFFERLIST , GF_DOM_EVENT_TARGET_MSE_SOURCEBUFFER , GF_DOM_EVENT_TARGET_XHR } |
enum | GF_DOMEventCategory { GF_DOM_EVENT_UNKNOWN_CATEGORY , GF_DOM_EVENT_DOM = 1 , GF_DOM_EVENT_MUTATION = 1<<1 , GF_DOM_EVENT_MOUSE = 1<<2 , GF_DOM_EVENT_FOCUS = 1<<3 , GF_DOM_EVENT_KEY = 1<<4 , GF_DOM_EVENT_UI = 1<<5 , GF_DOM_EVENT_TEXT = 1<<6 , GF_DOM_EVENT_SVG = 1<<7 , GF_DOM_EVENT_SMIL = 1<<8 , GF_DOM_EVENT_LASER = 1<<9 , GF_DOM_EVENT_MEDIA = 1<<10 , GF_DOM_EVENT_MEDIASOURCE = 1<<11 , GF_DOM_EVENT_GPAC = 1<<30 , GF_DOM_EVENT_FAKE = 0x80000000 } |
enum | GF_SGSMILTimingEvalState { SMIL_TIMING_EVAL_NONE = 0 , SMIL_TIMING_EVAL_UPDATE , SMIL_TIMING_EVAL_FREEZE , SMIL_TIMING_EVAL_REMOVE , SMIL_TIMING_EVAL_REPEAT , SMIL_TIMING_EVAL_FRACTION , SMIL_TIMING_EVAL_DISCARD , SMIL_TIMING_EVAL_ACTIVATE , SMIL_TIMING_EVAL_DEACTIVATE } |
Functions | |
GF_NamespaceType | gf_xml_get_namespace_id (char *name) |
GF_Err | gf_sg_add_namespace (GF_SceneGraph *sg, char *name, char *qname) |
GF_Err | gf_sg_remove_namespace (GF_SceneGraph *sg, char *name, char *qname) |
GF_NamespaceType | gf_sg_get_namespace_code (GF_SceneGraph *sg, char *qname) |
GF_NamespaceType | gf_sg_get_namespace_code_from_name (GF_SceneGraph *sg, char *name) |
const char * | gf_sg_get_namespace_qname (GF_SceneGraph *sg, GF_NamespaceType xmlns_id) |
const char * | gf_sg_get_namespace (GF_SceneGraph *sg, GF_NamespaceType xmlns_id) |
void | gf_xml_push_namespaces (GF_DOMNode *elt) |
void | gf_xml_pop_namespaces (GF_DOMNode *elt) |
GF_NamespaceType | gf_xml_get_element_namespace (GF_Node *n) |
GF_DOMText * | gf_dom_add_text_node (GF_Node *parent, char *text_data) |
void | gf_dom_set_textContent (GF_Node *n, char *text) |
char * | gf_dom_flatten_textContent (GF_Node *n) |
GF_DOMText * | gf_dom_new_text_node (GF_SceneGraph *sg) |
GF_DOMUpdates * | gf_dom_add_updates_node (GF_Node *parent) |
GF_DOMEventTarget * | gf_dom_event_target_new (GF_DOMEventTargetType type, void *obj) |
GF_Err | gf_sg_listener_associate (GF_Node *listener, GF_DOMEventTarget *evt_target) |
Bool | gf_dom_event_fire (GF_Node *node, GF_DOM_Event *event) |
Bool | gf_sg_fire_dom_event (GF_DOMEventTarget *et, GF_DOM_Event *event, GF_SceneGraph *sg, GF_Node *n) |
Bool | gf_dom_event_fire_ex (GF_Node *node, GF_DOM_Event *event, GF_List *use_stack) |
GF_EventType | gf_dom_event_type_by_name (const char *name) |
const char * | gf_dom_event_get_name (GF_EventType type) |
const char * | gf_dom_get_key_name (GF_KeyCode key_identifier) |
GF_KeyCode | gf_dom_get_key_type (char *key_name) |
GF_DOMEventCategory | gf_dom_event_get_category (GF_EventType type) |
void | gf_sg_register_event_type (GF_SceneGraph *sg, GF_DOMEventCategory category) |
void | gf_sg_unregister_event_type (GF_SceneGraph *sg, GF_DOMEventCategory category) |
GF_Err | gf_node_dom_listener_add (GF_Node *n, GF_Node *listener) |
u32 | gf_dom_listener_count (GF_Node *n) |
GF_Node * | gf_dom_listener_get (GF_Node *n, u32 idx) |
GF_DOMHandler * | gf_dom_listener_build (GF_Node *observer, GF_EventType event_type, u32 event_param) |
void | gf_node_register_iri (GF_SceneGraph *sg, XMLRI *iri) |
void | gf_node_unregister_iri (GF_SceneGraph *sg, XMLRI *iri) |
u32 | gf_node_animation_count (GF_Node *n) |
GF_Err | gf_node_store_embedded_data (XMLRI *iri, const char *cache_dir, const char *base_filename) |
void | gf_svg_properties_init_pointers (SVGPropertiesPointers *svg_props) |
void | gf_svg_properties_reset_pointers (SVGPropertiesPointers *svg_props) |
void | gf_svg_apply_animations (GF_Node *n, SVGPropertiesPointers *render_svg_props) |
Bool | gf_svg_has_appearance_flag_dirty (u32 flags) |
Bool | gf_svg_is_element_transformable (u32 tag) |
void * | gf_svg_create_attribute_value (u32 attribute_type) |
void | gf_svg_delete_attribute_value (u32 attribute_type, void *value, GF_SceneGraph *sg) |
Bool | gf_svg_attributes_equal (GF_FieldInfo *a, GF_FieldInfo *b) |
GF_Err | gf_svg_attributes_copy (GF_FieldInfo *a, GF_FieldInfo *b, Bool clamp) |
GF_Err | gf_svg_attributes_add (GF_FieldInfo *a, GF_FieldInfo *b, GF_FieldInfo *c, Bool clamp) |
Bool | gf_svg_attribute_is_interpolatable (u32 type) |
GF_Err | gf_svg_attributes_interpolate (GF_FieldInfo *a, GF_FieldInfo *b, GF_FieldInfo *c, Fixed coef, Bool clamp) |
GF_Err | gf_svg_attributes_muladd (Fixed alpha, GF_FieldInfo *a, Fixed beta, GF_FieldInfo *b, GF_FieldInfo *c, Bool clamp) |
GF_Err | gf_node_get_attribute_by_tag (GF_Node *n, u32 attribute_tag, Bool create_if_not_found, Bool set_default, GF_FieldInfo *field) |
const char * | gf_svg_attribute_type_to_string (u32 att_type) |
GF_Err | gf_svg_parse_attribute (GF_Node *n, GF_FieldInfo *info, char *attribute_content, u8 anim_value_type) |
void | gf_svg_parse_style (GF_Node *n, char *style) |
char * | gf_svg_dump_attribute (GF_Node *n, GF_FieldInfo *info) |
char * | gf_svg_dump_attribute_indexed (GF_Node *n, GF_FieldInfo *info) |
void | gf_svg_path_build (GF_Path *path, GF_List *commands, GF_List *points) |
GF_Err | gf_svg_parse_element_id (GF_Node *n, const char *nodename, Bool warning_if_defined) |
const char * | gf_svg_get_system_paint_server_name (u32 paint_type) |
u32 | gf_svg_get_system_paint_server_type (const char *name) |
Bool | gf_smil_notify_timed_elements (GF_SceneGraph *sg) |
void | gf_smil_timing_insert_clock (GF_Node *n, Bool is_end, Double clock) |
Bool | gf_svg_parse_transformlist (GF_Matrix2D *mat, char *attribute_content) |
void | gf_smil_set_evaluation_callback (GF_Node *smil_time, gf_sg_smil_evaluate smil_evaluate) |
void | gf_smil_set_media_duration (SMIL_Timing_RTI *rti, Double media_duration) |
Double | gf_smil_get_media_duration (SMIL_Timing_RTI *rti) |
GF_Node * | gf_smil_get_element (SMIL_Timing_RTI *rti) |
Bool | gf_smil_timing_is_active (GF_Node *node) |
void | gf_smil_timing_modified (GF_Node *node, GF_FieldInfo *field) |
void | gf_svg_flatten_attributes (SVG_Element *n, SVGAllAttributes *all_atts) |
const char * | gf_svg_get_attribute_name (GF_Node *n, u32 tag) |
u32 | gf_svg_apply_inheritance (SVGAllAttributes *all_atts, SVGPropertiesPointers *render_svg_props) |
GF_DOMAttribute * | gf_xml_create_attribute (GF_Node *n, u32 tag) |
u32 | gf_xml_get_attribute_type (u32 tag) |
u32 | gf_xml_get_attribute_tag (GF_Node *n, char *attribute_name, GF_NamespaceType ns) |
u32 | gf_xml_get_element_tag (const char *node_name, u32 xmlns) |
enum | { SVG_Unknown_datatype = 0 , XML_Space_datatype , XMLEV_Propagate_datatype , XMLEV_DefaultAction_datatype , XMLEV_Phase_datatype , SVG_FillRule_datatype , SVG_StrokeLineJoin_datatype , SVG_StrokeLineCap_datatype , SVG_FontStyle_datatype , SVG_FontWeight_datatype , SVG_FontVariant_datatype , SVG_TextAnchor_datatype , SVG_TransformType_datatype , SVG_Display_datatype , SVG_Visibility_datatype , SVG_Overflow_datatype , SVG_ZoomAndPan_datatype , SVG_DisplayAlign_datatype , SVG_PointerEvents_datatype , SVG_RenderingHint_datatype , SVG_VectorEffect_datatype , SVG_PlaybackOrder_datatype , SVG_TimelineBegin_datatype , SVG_GradientUnit_datatype , SVG_InitialVisibility_datatype , SVG_FocusHighlight_datatype , SVG_Overlay_datatype , SVG_TransformBehavior_datatype , SVG_SpreadMethod_datatype , SVG_TextAlign_datatype , SVG_Focusable_datatype , SVG_Filter_TransferType_datatype , SMIL_SyncBehavior_datatype , SMIL_SyncTolerance_datatype , SMIL_AttributeType_datatype , SMIL_CalcMode_datatype , SMIL_Additive_datatype , SMIL_Accumulate_datatype , SMIL_Restart_datatype , SMIL_Fill_datatype , SVG_ClipPath_datatype , SVG_LAST_U8_PROPERTY , DOM_String_datatype , DOM_StringList_datatype , XMLEV_Event_datatype , XMLRI_datatype , XMLRI_List_datatype , XML_IDREF_datatype , SMIL_KeyTimes_datatype , SMIL_KeySplines_datatype , SMIL_KeyPoints_datatype , SMIL_Times_datatype , SMIL_AnimateValue_datatype , SMIL_AnimateValues_datatype , SMIL_Duration_datatype , SMIL_RepeatCount_datatype , SMIL_AttributeName_datatype , SVG_Number_datatype , SVG_FontSize_datatype , SVG_Length_datatype , SVG_Coordinate_datatype , SVG_Rotate_datatype , SVG_Numbers_datatype , SVG_Points_datatype , SVG_Coordinates_datatype , SVG_Boolean_datatype , SVG_Color_datatype , SVG_Paint_datatype , SVG_PathData_datatype , SVG_FontFamily_datatype , SVG_ID_datatype , SVG_StrokeDashArray_datatype , SVG_PreserveAspectRatio_datatype , SVG_ViewBox_datatype , SVG_GradientOffset_datatype , SVG_Focus_datatype , SVG_Clock_datatype , SVG_ContentType_datatype , SVG_LanguageID_datatype , SVG_Transform_datatype , SVG_Transform_Translate_datatype , SVG_Transform_Scale_datatype , SVG_Transform_SkewX_datatype , SVG_Transform_SkewY_datatype , SVG_Transform_Rotate_datatype , SVG_Motion_datatype , LASeR_Choice_datatype , LASeR_Size_datatype , SVG_Matrix2D_datatype , SVG_NodeList_datatype } |
Data types used for SVG scene graph. More... | |
This section documents the Scenegraph for SVG files.
struct GF_DOMAttribute |
DOM attribute
struct GF_DOMFullAttribute |
DOM full attribute
Data Fields | ||
---|---|---|
GF_DOM_BASE_ATTRIBUTE u32 | xmlns | |
char * | name |
struct GF_DOMNode |
DOM base node
struct GF_DOMFullNode |
DOM full node
Data Fields | ||
---|---|---|
GF_DOM_BASE_NODE char * | name | |
u32 | ns |
struct GF_DOMUpdates |
struct GF_DOMEventTarget |
DOM EventTarget Interface
Data Fields | ||
---|---|---|
GF_List * | listeners |
list of SVG Listener nodes attached to this Event Target |
void * | ptr |
pointer to the object implementing the DOM Event Target Interface |
GF_DOMEventTargetType | ptr_type |
type of the object implementing the DOM Event Target Interface |
struct GF_DOMMediaEvent |
struct GF_DOM_Event |
DOM Event structure
Data Fields | ||
---|---|---|
GF_EventType | type | |
u8 | event_phase | |
u8 | bubbles | |
u8 | cancelable | |
u8 | has_ui_events | |
void * | target | |
GF_DOMEventTargetType | target_type | |
GF_DOMEventTarget * | currentTarget | |
Double | timestamp | |
u32 | detail | |
s32 | screenX | |
s32 | screenY | |
s32 | clientX | |
s32 | clientY | |
u32 | button | |
u32 | key_flags | |
u32 | key_hw_code | |
GF_Node * | relatedTarget | |
GF_Rect | screen_rect | |
GF_Point2D | prev_translate | |
GF_Point2D | new_translate | |
Fixed | prev_scale | |
Fixed | new_scale | |
u32 | cpu_percentage | |
Bool | onBattery | |
u32 | batteryState | |
u32 | batteryLevel | |
Double | smil_event_time | |
GF_Node * | relatedNode | |
Bool | is_vrml | |
GF_DOMMediaEvent | media_event | |
u32 | consumed | |
GF_FieldInfo * | attr | |
GF_Err | error_state | |
const char * | addon_url |
struct SVGPropertiesPointers |
SVG properties of node
Data Fields | ||
---|---|---|
SVG_Paint * | color | |
SVG_Paint * | fill | |
SVG_Paint * | stroke | |
SVG_Paint * | solid_color | |
SVG_Paint * | stop_color | |
SVG_Paint * | viewport_fill | |
SVG_Number * | fill_opacity | |
SVG_Number * | solid_opacity | |
SVG_Number * | stop_opacity | |
SVG_Number * | stroke_opacity | |
SVG_Number * | viewport_fill_opacity | |
SVG_Number * | opacity | |
SVG_Number * | audio_level | |
Fixed | computed_audio_level | |
SVG_RenderingHint * | color_rendering | |
SVG_RenderingHint * | image_rendering | |
SVG_RenderingHint * | shape_rendering | |
SVG_RenderingHint * | text_rendering | |
SVG_Display * | display | |
SVG_Visibility * | visibility | |
SVG_Overflow * | overflow | |
SVG_FontFamily * | font_family | |
SVG_FontSize * | font_size | |
SVG_FontStyle * | font_style | |
SVG_FontWeight * | font_weight | |
SVG_FontVariant * | font_variant | |
SVG_Number * | line_increment | |
SVG_TextAnchor * | text_anchor | |
SVG_DisplayAlign * | display_align | |
SVG_TextAlign * | text_align | |
SVG_PointerEvents * | pointer_events | |
SVG_FillRule * | fill_rule | |
SVG_StrokeDashArray * | stroke_dasharray | |
SVG_Length * | stroke_dashoffset | |
SVG_StrokeLineCap * | stroke_linecap | |
SVG_StrokeLineJoin * | stroke_linejoin | |
SVG_Number * | stroke_miterlimit | |
SVG_Length * | stroke_width | |
SVG_VectorEffect * | vector_effect |
#define GF_DOM_BASE_ATTRIBUTE |
#define GF_DOM_FULL_ATTRIBUTE GF_DOM_ATTRIBUTE \ |
macro for DOM full attribute
#define GF_DOM_BASE_NODE |
macro for DOM base node
#define GF_DOM_BASE_LISTENER |
macro for DOM listener DOM listener is simply a node added to the node events list. Only one observer can be attached to a listener. The listener will remove itself from the observer event list when destructed.
typedef struct _smil_timing_rti SMIL_Timing_RTI |
SMIL runtime timing information
typedef void gf_sg_smil_evaluate(struct _smil_timing_rti *rti, Fixed normalized_simple_time, GF_SGSMILTimingEvalState state) |
SMIL timing evaluation callback
rti | SMIL runtime info |
normalized_simple_time | SMIL normalized time |
state | SMIL evaluation state |
typedef struct __dom_base_attribute SVGAttribute |
SVG attribute - same as DOM attribute
typedef struct __dom_full_attribute SVGExtendedAttribute |
SVG extended attribute - same as DOM extended attribute
typedef struct __dom_base_node SVG_Element |
SVG node - same as DOM node
typedef struct __xml_ev_handler SVG_handlerElement |
SVG handler node - same as DOM Event handler
typedef struct _all_atts SVGAllAttributes |
SVG all attributes
anonymous enum |
DOM attributes tags for xmlspace, xmlev, xlink, SVG and LASeR
enum GF_NamespaceType |
DOM built-in namespaces
anonymous enum |
enum GF_DOMEventPhase |
DOM Event phases
DOM Event possible targets
enum GF_DOMEventCategory |
DOM Event category
SMIL timing evaluation state
anonymous enum |
This section documents the data types used for SVG scene graph.
SVG attribute types
GF_NamespaceType gf_xml_get_namespace_id | ( | char * | name | ) |
gets built-in XMLNS id for this namespace
name | name of the namespace |
GF_Err gf_sg_add_namespace | ( | GF_SceneGraph * | sg, |
char * | name, | ||
char * | qname | ||
) |
adds a new namespace
sg | the target scene graph |
name | name of the namespace (full URL) |
qname | QName of the namespace (short name in doc, eg "ev") |
GF_Err gf_sg_remove_namespace | ( | GF_SceneGraph * | sg, |
char * | name, | ||
char * | qname | ||
) |
removes a new namespace
sg | the target scene graph |
name | name of the namespace |
qname | QName of the namespace |
GF_NamespaceType gf_sg_get_namespace_code | ( | GF_SceneGraph * | sg, |
char * | qname | ||
) |
gets namespace code
sg | the target scene graph |
qname | QName of the namespace |
GF_NamespaceType gf_sg_get_namespace_code_from_name | ( | GF_SceneGraph * | sg, |
char * | name | ||
) |
gets namespace code from name
sg | the target scene graph |
name | name of the namespace |
const char* gf_sg_get_namespace_qname | ( | GF_SceneGraph * | sg, |
GF_NamespaceType | xmlns_id | ||
) |
gets namespace qname from ID
sg | the target scene graph |
xmlns_id | ID of the namespace |
const char* gf_sg_get_namespace | ( | GF_SceneGraph * | sg, |
GF_NamespaceType | xmlns_id | ||
) |
gets namespace from ID
sg | the target scene graph |
xmlns_id | ID of the namespace |
void gf_xml_push_namespaces | ( | GF_DOMNode * | elt | ) |
push namespace parsing state
elt | the current node being parsed |
void gf_xml_pop_namespaces | ( | GF_DOMNode * | elt | ) |
pop namespace parsing state
elt | the current node being parsed |
GF_NamespaceType gf_xml_get_element_namespace | ( | GF_Node * | n | ) |
gets namespace of an element
n | the target node |
GF_DOMText* gf_dom_add_text_node | ( | GF_Node * | parent, |
char * | text_data | ||
) |
creates a new text node, assign string (does NOT duplicate it) and register node with parent if desired
parent | the target parent node |
text_data | UTF-8 data to add as a text node |
void gf_dom_set_textContent | ( | GF_Node * | n, |
char * | text | ||
) |
replaces text content of node by the specified string
n | the target DOM node |
text | the replacement string in UTF-8. If NULL, only resets the children of the node data to add as a text node |
char* gf_dom_flatten_textContent | ( | GF_Node * | n | ) |
flattens text content of the node
n | the target DOM node |
GF_DOMText* gf_dom_new_text_node | ( | GF_SceneGraph * | sg | ) |
creates a new text node - this DOES NOT register the node
sg | the target scene graph for the node |
GF_DOMUpdates* gf_dom_add_updates_node | ( | GF_Node * | parent | ) |
creates a new updates node and register node with parent
parent | the target parent node |
GF_DOMEventTarget* gf_dom_event_target_new | ( | GF_DOMEventTargetType | type, |
void * | obj | ||
) |
creates a new event target
type | the type of the event target |
obj | opaque data passed to the event target |
GF_Err gf_sg_listener_associate | ( | GF_Node * | listener, |
GF_DOMEventTarget * | evt_target | ||
) |
associates a listener node and a event target node
listener | the target listener |
evt_target | the event target |
Bool gf_dom_event_fire | ( | GF_Node * | node, |
GF_DOM_Event * | event | ||
) |
fires an event on the specified node
node | the target node |
event | the DOM event |
Bool gf_sg_fire_dom_event | ( | GF_DOMEventTarget * | et, |
GF_DOM_Event * | event, | ||
GF_SceneGraph * | sg, | ||
GF_Node * | n | ||
) |
fires a DOM event on the specified node
et | the event target |
event | the dom event |
sg | the parent graph |
n | the event current target, can be NULL |
Bool gf_dom_event_fire_ex | ( | GF_Node * | node, |
GF_DOM_Event * | event, | ||
GF_List * | use_stack | ||
) |
fires event on the specified node
node | the target node |
event | the DOM event |
use_stack | a list of parent node/use node pairs for bubbling phase - may be NULL |
GF_EventType gf_dom_event_type_by_name | ( | const char * | name | ) |
gets event type by name
name | the event name |
const char* gf_dom_event_get_name | ( | GF_EventType | type | ) |
gets event name by type
type | the event type |
const char* gf_dom_get_key_name | ( | GF_KeyCode | key_identifier | ) |
gets key name by type
key_identifier | the key type |
GF_KeyCode gf_dom_get_key_type | ( | char * | key_name | ) |
gets key type by name
key_name | the key name |
GF_DOMEventCategory gf_dom_event_get_category | ( | GF_EventType | type | ) |
gets category of DOM event
type | type of event |
void gf_sg_register_event_type | ( | GF_SceneGraph * | sg, |
GF_DOMEventCategory | category | ||
) |
registers an event category with the scene graph. Event with unregistered categories will not be fired
sg | the target scene graph |
category | the DOM event category to add |
void gf_sg_unregister_event_type | ( | GF_SceneGraph * | sg, |
GF_DOMEventCategory | category | ||
) |
unregisters an event category with the scene graph
sg | the target scene graph |
category | the DOM event category to add |
adds a listener to the node.
n | the target node |
listener | a listenerElement (XML event). The listener node is NOT registered with the node (it may very well not be a direct child of the node) |
gets number of listener of a node
n | the target node |
gets a listener of a node
n | the target node |
idx | 0-based index of the listener to query |
GF_DOMHandler* gf_dom_listener_build | ( | GF_Node * | observer, |
GF_EventType | event_type, | ||
u32 | event_param | ||
) |
creates a default listener/handler for the given event on the given node Listener/handler are stored at the node level
observer | the observer node |
event_type | the event type |
event_param | the event parameter |
void gf_node_register_iri | ( | GF_SceneGraph * | sg, |
XMLRI * | iri | ||
) |
registers a XML IRI with the scene graph - this is needed to handle replacement of IRI (SMIL anim, DOM / LASeR updates)
sg | the target scene graph |
iri | the IRI to register |
void gf_node_unregister_iri | ( | GF_SceneGraph * | sg, |
XMLRI * | iri | ||
) |
unregisters a XML IRI with the scene graph
sg | the target scene graph |
iri | the IRI to unregister |
gets number of animation targeting this node
n | the target node |
GF_Err gf_node_store_embedded_data | ( | XMLRI * | iri, |
const char * | cache_dir, | ||
const char * | base_filename | ||
) |
writes data embedded in IRI (such as base64 data) to the indicated cahce directory, and updates the IRI accordingly
iri | the IRI to store |
cache_dir | location of the directory to which the data should be extracted |
base_filename | location of the file the IRI was declared in |
void gf_svg_properties_init_pointers | ( | SVGPropertiesPointers * | svg_props | ) |
initializes an SVGPropertiesPointers
svg_props | pointer to structure to initialize |
void gf_svg_properties_reset_pointers | ( | SVGPropertiesPointers * | svg_props | ) |
resets an SVGPropertiesPointers
svg_props | pointer to structure to reset |
void gf_svg_apply_animations | ( | GF_Node * | n, |
SVGPropertiesPointers * | render_svg_props | ||
) |
applies animations for the node
n | the target node |
render_svg_props | pointer to rendering SVG properties of the node |
check if appearance flag is set
flags | flags to test |
checks if node tag indicates a transformable elemnt
tag | tag to check |
void* gf_svg_create_attribute_value | ( | u32 | attribute_type | ) |
creates an SVG attribute value for the given type
attribute_type | type of attribute to delete |
void gf_svg_delete_attribute_value | ( | u32 | attribute_type, |
void * | value, | ||
GF_SceneGraph * | sg | ||
) |
destroys an SVG attribute value
attribute_type | type of attribute to delete |
value | the value to destroy |
sg | the parent scenegraph (needed for IRI registration) |
Bool gf_svg_attributes_equal | ( | GF_FieldInfo * | a, |
GF_FieldInfo * | b | ||
) |
checks if two SVG attributes are equal
a | first attribute |
b | second attribute |
GF_Err gf_svg_attributes_copy | ( | GF_FieldInfo * | a, |
GF_FieldInfo * | b, | ||
Bool | clamp | ||
) |
copies attributes (a = b)
a | destination attribute |
b | source attribute |
clamp | if GF_TRUE, the interpolated value is clamped to its min/max possible values |
GF_Err gf_svg_attributes_add | ( | GF_FieldInfo * | a, |
GF_FieldInfo * | b, | ||
GF_FieldInfo * | c, | ||
Bool | clamp | ||
) |
adds attributes ( c = a + b)
a | first attribute |
b | second attribute |
c | destination attribute |
clamp | if GF_TRUE, the interpolated value is clamped to its min/max possible values |
checks if attribute type can be interpolated
type | attribute type |
GF_Err gf_svg_attributes_interpolate | ( | GF_FieldInfo * | a, |
GF_FieldInfo * | b, | ||
GF_FieldInfo * | c, | ||
Fixed | coef, | ||
Bool | clamp | ||
) |
interpolates attributes ( c = coef * a + (1 - coef) * b )
a | first attribute |
b | second attribute |
c | destination attribute |
coef | interpolation coefficient |
clamp | if GF_TRUE, the interpolated value is clamped to its min/max possible values |
GF_Err gf_svg_attributes_muladd | ( | Fixed | alpha, |
GF_FieldInfo * | a, | ||
Fixed | beta, | ||
GF_FieldInfo * | b, | ||
GF_FieldInfo * | c, | ||
Bool | clamp | ||
) |
multiply and add attributes (c = alpha * a + beta * b)
a | first attribute |
alpha | first multiplier |
b | second attribute |
beta | second multiplier |
c | destination attribute |
clamp | if GF_TRUE, the interpolated value is clamped to its min/max possible values |
GF_Err gf_node_get_attribute_by_tag | ( | GF_Node * | n, |
u32 | attribute_tag, | ||
Bool | create_if_not_found, | ||
Bool | set_default, | ||
GF_FieldInfo * | field | ||
) |
gets an attribute by its tag (built-in name)
n | the target node |
attribute_tag | the attribute tag |
create_if_not_found | if GF_TRUE, adds the attribute if not found |
set_default | if GF_TRUE, sets the attribute to default when creating it |
field | set to the attribute information |
const char* gf_svg_attribute_type_to_string | ( | u32 | att_type | ) |
gets name of an attribute type
att_type | the attribute type |
GF_Err gf_svg_parse_attribute | ( | GF_Node * | n, |
GF_FieldInfo * | info, | ||
char * | attribute_content, | ||
u8 | anim_value_type | ||
) |
parses an attribute
n | the target node |
info | the attribute information |
attribute_content | the UTF-8 string to parse |
anim_value_type | the SMIL animation value type for this attribute, 0 if not animatable |
void gf_svg_parse_style | ( | GF_Node * | n, |
char * | style | ||
) |
parses an SVG style
n | the target node |
style | the UTF-8 style string to parse |
char* gf_svg_dump_attribute | ( | GF_Node * | n, |
GF_FieldInfo * | info | ||
) |
dumps an SVG attribute
n | the target node |
info | the attribute information |
char* gf_svg_dump_attribute_indexed | ( | GF_Node * | n, |
GF_FieldInfo * | info | ||
) |
dumps an SVG indexed attribute (special 1-D version of a N dimensional attribute, used by LASeR and DOM updates)
n | the target node |
info | the attribute information |
builds a path from its SVG representation
path | a 2D graphical path object |
commands | a list of SVG path commands |
points | a list of SVG path points |
parses an SVG element ID
n | the target node |
nodename | the node name to parse |
warning_if_defined | if GF_TRUE, throws a warning when the node name is already defined |
const char* gf_svg_get_system_paint_server_name | ( | u32 | paint_type | ) |
gets the name of a paint server type
paint_type | the paint server type |
u32 gf_svg_get_system_paint_server_type | ( | const char * | name | ) |
gets the type of a paint server by name
name | the paint server name |
Bool gf_smil_notify_timed_elements | ( | GF_SceneGraph * | sg | ) |
notifies the scene time to all the timed elements in the given scene graph (including sub-scenes).
sg | the target scene graph |
inserts a new resolved time instant in the begin or end attribute. The insertion preserves the sorting and removes the previous insertions which have become obsolete
n | the target element |
is_end | if GF_TRUE, the SMIL clock is an end clock |
clock | clock time in seconds |
Bool gf_svg_parse_transformlist | ( | GF_Matrix2D * | mat, |
char * | attribute_content | ||
) |
parses a transformation list into a 2D matrix
mat | the matrix to fill |
attribute_content | the UTF8 string representin the SVG transformation |
void gf_smil_set_evaluation_callback | ( | GF_Node * | smil_time, |
gf_sg_smil_evaluate | smil_evaluate | ||
) |
sets the SMIL evaluation callback for a node
smil_time | the target SMIL node |
smil_evaluate | the callback function |
void gf_smil_set_media_duration | ( | SMIL_Timing_RTI * | rti, |
Double | media_duration | ||
) |
assigns media duration for a SMIL node
rti | the target SMIL runtime info of the node |
media_duration | the media duration in seconds |
Double gf_smil_get_media_duration | ( | SMIL_Timing_RTI * | rti | ) |
gets media duration of a SMIL node
rti | the target SMIL runtime info of the node |
GF_Node* gf_smil_get_element | ( | SMIL_Timing_RTI * | rti | ) |
gets node from a SMIL runtime info
rti | the target SMIL runtime info of the node |
checks if a SMIL node is active
node | the target node |
void gf_smil_timing_modified | ( | GF_Node * | node, |
GF_FieldInfo * | field | ||
) |
notifies a SMIL node that it has been modified
node | the target SMIL node |
field | the field information describing the modified attribute, may be NULL |
void gf_svg_flatten_attributes | ( | SVG_Element * | n, |
SVGAllAttributes * | all_atts | ||
) |
flattens all SVG attributes in a structure
n | the target SVG node |
all_atts | filled with all SVG attributes defined fo node |
gets SVG attribute name for a node
n | the target SVG node |
tag | the attribute tag |
u32 gf_svg_apply_inheritance | ( | SVGAllAttributes * | all_atts, |
SVGPropertiesPointers * | render_svg_props | ||
) |
applies inheritance of SVG attributes to a render_svg_props
all_atts | the flatten SVG attributes of the node |
render_svg_props | the set of properties applying to the parent node (initialize this one to 0 for root element) |
GF_DOMAttribute* gf_xml_create_attribute | ( | GF_Node * | n, |
u32 | tag | ||
) |
creates a DOM Attribute for the given tag
n | the target node |
tag | the target built-in tag |
gets the type of a built-in XML/SVG/SMIL attribute tag
tag | the target attribute tag |
u32 gf_xml_get_attribute_tag | ( | GF_Node * | n, |
char * | attribute_name, | ||
GF_NamespaceType | ns | ||
) |
gets the built-in tag of a node's attribute
n | the target node |
attribute_name | the target attribute name |
ns | the target namespace |