2 * Copyright 2019 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
34 #include "htmlevent.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
40 ISVGElement ISVGElement_iface
;
43 static inline SVGElement
*impl_from_ISVGElement(ISVGElement
*iface
)
45 return CONTAINING_RECORD(iface
, SVGElement
, ISVGElement_iface
);
48 DISPEX_IDISPATCH_IMPL(SVGElement
, ISVGElement
,
49 impl_from_ISVGElement(iface
)->element
.node
.event_target
.dispex
)
51 static HRESULT WINAPI
SVGElement_put_xmlbase(ISVGElement
*iface
, BSTR v
)
53 SVGElement
*This
= impl_from_ISVGElement(iface
);
54 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
58 static HRESULT WINAPI
SVGElement_get_xmlbase(ISVGElement
*iface
, BSTR
*p
)
60 SVGElement
*This
= impl_from_ISVGElement(iface
);
61 FIXME("(%p)->(%p)\n", This
, p
);
65 static HRESULT WINAPI
SVGElement_putref_ownerSVGElement(ISVGElement
*iface
, ISVGSVGElement
*v
)
67 SVGElement
*This
= impl_from_ISVGElement(iface
);
68 FIXME("(%p)->(%p)\n", This
, v
);
72 static HRESULT WINAPI
SVGElement_get_ownerSVGElement(ISVGElement
*iface
, ISVGSVGElement
**p
)
74 SVGElement
*This
= impl_from_ISVGElement(iface
);
75 FIXME("(%p)->(%p)\n", This
, p
);
79 static HRESULT WINAPI
SVGElement_putref_viewportElement(ISVGElement
*iface
, ISVGElement
*v
)
81 SVGElement
*This
= impl_from_ISVGElement(iface
);
82 FIXME("(%p)->(%p)\n", This
, v
);
86 static HRESULT WINAPI
SVGElement_get_viewportElement(ISVGElement
*iface
, ISVGElement
**p
)
88 SVGElement
*This
= impl_from_ISVGElement(iface
);
89 FIXME("(%p)->(%p)\n", This
, p
);
93 static HRESULT WINAPI
SVGElement_putref_focusable(ISVGElement
*iface
, ISVGAnimatedEnumeration
*v
)
95 SVGElement
*This
= impl_from_ISVGElement(iface
);
96 FIXME("(%p)->(%p)\n", This
, v
);
100 static HRESULT WINAPI
SVGElement_get_focusable(ISVGElement
*iface
, ISVGAnimatedEnumeration
**p
)
102 SVGElement
*This
= impl_from_ISVGElement(iface
);
103 FIXME("(%p)->(%p)\n", This
, p
);
107 static const ISVGElementVtbl SVGElementVtbl
= {
108 SVGElement_QueryInterface
,
111 SVGElement_GetTypeInfoCount
,
112 SVGElement_GetTypeInfo
,
113 SVGElement_GetIDsOfNames
,
115 SVGElement_put_xmlbase
,
116 SVGElement_get_xmlbase
,
117 SVGElement_putref_ownerSVGElement
,
118 SVGElement_get_ownerSVGElement
,
119 SVGElement_putref_viewportElement
,
120 SVGElement_get_viewportElement
,
121 SVGElement_putref_focusable
,
122 SVGElement_get_focusable
125 static inline SVGElement
*SVGElement_from_DispatchEx(DispatchEx
*iface
)
127 return CONTAINING_RECORD(iface
, SVGElement
, element
.node
.event_target
.dispex
);
130 static void *SVGElement_query_interface(DispatchEx
*dispex
, REFIID riid
)
132 SVGElement
*This
= SVGElement_from_DispatchEx(dispex
);
134 if(IsEqualGUID(&IID_ISVGElement
, riid
))
135 return &This
->ISVGElement_iface
;
137 return HTMLElement_query_interface(&This
->element
.node
.event_target
.dispex
, riid
);
140 static const NodeImplVtbl SVGElementImplVtbl
= {
141 .clsid
= &CLSID_SVGElement
,
142 .cpc_entries
= HTMLElement_cpc
,
143 .clone
= HTMLElement_clone
,
144 .get_attr_col
= HTMLElement_get_attr_col
,
147 static const event_target_vtbl_t SVGElement_event_target_vtbl
= {
149 HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
150 .query_interface
= SVGElement_query_interface
,
151 .destructor
= HTMLElement_destructor
,
152 .traverse
= HTMLElement_traverse
,
153 .unlink
= HTMLElement_unlink
155 HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
156 .handle_event
= HTMLElement_handle_event
159 static dispex_static_data_t SVGElement_dispex
= {
160 "HTMLUnknownElement",
161 &SVGElement_event_target_vtbl
.dispex_vtbl
,
162 DispHTMLUnknownElement_tid
,
163 HTMLElement_iface_tids
,
164 HTMLElement_init_dispex_info
167 static void init_svg_element(SVGElement
*svg_element
, HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, dispex_static_data_t
*dispex_data
)
169 svg_element
->ISVGElement_iface
.lpVtbl
= &SVGElementVtbl
;
170 HTMLElement_Init(&svg_element
->element
, doc
, (nsIDOMElement
*)nselem
, dispex_data
);
173 struct SVGSVGElement
{
174 SVGElement svg_element
;
175 ISVGSVGElement ISVGSVGElement_iface
;
178 static inline SVGSVGElement
*impl_from_ISVGSVGElement(ISVGSVGElement
*iface
)
180 return CONTAINING_RECORD(iface
, SVGSVGElement
, ISVGSVGElement_iface
);
183 DISPEX_IDISPATCH_IMPL(SVGSVGElement
, ISVGSVGElement
,
184 impl_from_ISVGSVGElement(iface
)->svg_element
.element
.node
.event_target
.dispex
)
186 static HRESULT WINAPI
SVGSVGElement_putref_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
188 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
189 FIXME("(%p)->(%p)\n", This
, v
);
193 static HRESULT WINAPI
SVGSVGElement_get_x(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
195 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
196 FIXME("(%p)->(%p)\n", This
, p
);
200 static HRESULT WINAPI
SVGSVGElement_putref_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
202 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
203 FIXME("(%p)->(%p)\n", This
, v
);
207 static HRESULT WINAPI
SVGSVGElement_get_y(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
209 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
210 FIXME("(%p)->(%p)\n", This
, p
);
214 static HRESULT WINAPI
SVGSVGElement_putref_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
216 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
217 FIXME("(%p)->(%p)\n", This
, v
);
221 static HRESULT WINAPI
SVGSVGElement_get_width(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
223 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
224 FIXME("(%p)->(%p)\n", This
, p
);
228 static HRESULT WINAPI
SVGSVGElement_putref_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
*v
)
230 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
231 FIXME("(%p)->(%p)\n", This
, v
);
235 static HRESULT WINAPI
SVGSVGElement_get_height(ISVGSVGElement
*iface
, ISVGAnimatedLength
**p
)
237 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
238 FIXME("(%p)->(%p)\n", This
, p
);
242 static HRESULT WINAPI
SVGSVGElement_put_contentScriptType(ISVGSVGElement
*iface
, BSTR v
)
244 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
245 FIXME("(%p)->(%s)\n", This
, debugstr_w(v
));
249 static HRESULT WINAPI
SVGSVGElement_get_contentScriptType(ISVGSVGElement
*iface
, BSTR
*p
)
251 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
252 FIXME("(%p)->(%p)\n", This
, p
);
256 static HRESULT WINAPI
SVGSVGElement_put_contentStyleType(ISVGSVGElement
*iface
, BSTR v
)
258 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
259 FIXME("(%p)->(%p)\n", This
, v
);
263 static HRESULT WINAPI
SVGSVGElement_get_contentStyleType(ISVGSVGElement
*iface
, BSTR
*p
)
265 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
266 FIXME("(%p)->(%p)\n", This
, p
);
270 static HRESULT WINAPI
SVGSVGElement_putref_viewport(ISVGSVGElement
*iface
, ISVGRect
*v
)
272 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
273 FIXME("(%p)->(%p)\n", This
, v
);
277 static HRESULT WINAPI
SVGSVGElement_get_viewport(ISVGSVGElement
*iface
, ISVGRect
**p
)
279 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
280 FIXME("(%p)->(%p)\n", This
, p
);
284 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float v
)
286 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
287 FIXME("(%p)->(%f)\n", This
, v
);
291 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterX(ISVGSVGElement
*iface
, float *p
)
293 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
294 FIXME("(%p)->(%p)\n", This
, p
);
298 static HRESULT WINAPI
SVGSVGElement_put_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float v
)
300 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
301 FIXME("(%p)->(%f)\n", This
, v
);
305 static HRESULT WINAPI
SVGSVGElement_get_pixelUnitToMillimeterY(ISVGSVGElement
*iface
, float *p
)
307 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
308 FIXME("(%p)->(%p)\n", This
, p
);
312 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float v
)
314 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
315 FIXME("(%p)->(%f)\n", This
, v
);
319 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterX(ISVGSVGElement
*iface
, float *p
)
321 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
322 FIXME("(%p)->(%p)\n", This
, p
);
326 static HRESULT WINAPI
SVGSVGElement_put_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float v
)
328 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
329 FIXME("(%p)->(%f)\n", This
, v
);
333 static HRESULT WINAPI
SVGSVGElement_get_screenPixelToMillimeterY(ISVGSVGElement
*iface
, float *p
)
335 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
336 FIXME("(%p)->(%p)\n", This
, p
);
340 static HRESULT WINAPI
SVGSVGElement_put_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL v
)
342 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
343 FIXME("(%p)->(%x)\n", This
, v
);
347 static HRESULT WINAPI
SVGSVGElement_get_useCurrentView(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
349 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
350 FIXME("(%p)->(%p)\n", This
, p
);
354 static HRESULT WINAPI
SVGSVGElement_putref_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
*v
)
356 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
357 FIXME("(%p)->(%p)\n", This
, v
);
361 static HRESULT WINAPI
SVGSVGElement_get_currentView(ISVGSVGElement
*iface
, ISVGViewSpec
**p
)
363 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
364 FIXME("(%p)->(%p)\n", This
, p
);
368 static HRESULT WINAPI
SVGSVGElement_put_currentScale(ISVGSVGElement
*iface
, float v
)
370 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
371 FIXME("(%p)->(%f)\n", This
, v
);
375 static HRESULT WINAPI
SVGSVGElement_get_currentScale(ISVGSVGElement
*iface
, float *p
)
377 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
378 FIXME("(%p)->(%p)\n", This
, p
);
382 static HRESULT WINAPI
SVGSVGElement_putref_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
*v
)
384 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
385 FIXME("(%p)->(%p)\n", This
, v
);
389 static HRESULT WINAPI
SVGSVGElement_get_currentTranslate(ISVGSVGElement
*iface
, ISVGPoint
**p
)
391 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
392 FIXME("(%p)->(%p)\n", This
, p
);
396 static HRESULT WINAPI
SVGSVGElement_suspendRedraw(ISVGSVGElement
*iface
, ULONG max_wait
, ULONG
*p
)
398 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
399 FIXME("(%p)->(%lu %p)\n", This
, max_wait
, p
);
403 static HRESULT WINAPI
SVGSVGElement_unsuspendRedraw(ISVGSVGElement
*iface
, ULONG id
)
405 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
406 FIXME("(%p)->(%lu)\n", This
, id
);
410 static HRESULT WINAPI
SVGSVGElement_unsuspendRedrawAll(ISVGSVGElement
*iface
)
412 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
413 FIXME("(%p)\n", This
);
417 static HRESULT WINAPI
SVGSVGElement_forceRedraw(ISVGSVGElement
*iface
)
419 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
420 FIXME("(%p)\n", This
);
424 static HRESULT WINAPI
SVGSVGElement_pauseAnimations(ISVGSVGElement
*iface
)
426 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
427 FIXME("(%p)\n", This
);
431 static HRESULT WINAPI
SVGSVGElement_unpauseAnimations(ISVGSVGElement
*iface
)
433 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
434 FIXME("(%p)\n", This
);
438 static HRESULT WINAPI
SVGSVGElement_animationsPaused(ISVGSVGElement
*iface
, VARIANT_BOOL
*p
)
440 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
441 FIXME("(%p)->(%p)\n", This
, p
);
445 static HRESULT WINAPI
SVGSVGElement_getCurrentTime(ISVGSVGElement
*iface
, float *p
)
447 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
448 FIXME("(%p)->(%p)\n", This
, p
);
452 static HRESULT WINAPI
SVGSVGElement_setCurrentTime(ISVGSVGElement
*iface
, float v
)
454 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
455 FIXME("(%p)->(%f)\n", This
, v
);
459 static HRESULT WINAPI
SVGSVGElement_getIntersectionList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
460 ISVGElement
*reference_element
, VARIANT
*p
)
462 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
463 FIXME("(%p)->(%p %p %p)\n", This
, rect
, reference_element
, p
);
467 static HRESULT WINAPI
SVGSVGElement_getEnclosureList(ISVGSVGElement
*iface
, ISVGRect
*rect
,
468 ISVGElement
*reference_element
, VARIANT
*p
)
470 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
471 FIXME("(%p)->()\n", This
);
475 static HRESULT WINAPI
SVGSVGElement_checkIntersection(ISVGSVGElement
*iface
, ISVGElement
*element
,
476 ISVGRect
*rect
, VARIANT_BOOL
*p
)
478 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
479 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
483 static HRESULT WINAPI
SVGSVGElement_checkEnclosure(ISVGSVGElement
*iface
, ISVGElement
*element
,
484 ISVGRect
*rect
, VARIANT_BOOL
*p
)
486 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
487 FIXME("(%p)->(%p %p %p)\n", This
, element
, rect
, p
);
491 static HRESULT WINAPI
SVGSVGElement_deselectAll(ISVGSVGElement
*iface
)
493 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
494 FIXME("(%p)\n", This
);
498 static HRESULT WINAPI
SVGSVGElement_createSVGNumber(ISVGSVGElement
*iface
, ISVGNumber
**p
)
500 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
501 FIXME("(%p)->(%p)\n", This
, p
);
505 static HRESULT WINAPI
SVGSVGElement_createSVGLength(ISVGSVGElement
*iface
, ISVGLength
**p
)
507 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
508 FIXME("(%p)->(%p)\n", This
, p
);
512 static HRESULT WINAPI
SVGSVGElement_createSVGAngle(ISVGSVGElement
*iface
, ISVGAngle
**p
)
514 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
515 FIXME("(%p)->(%p)\n", This
, p
);
519 static HRESULT WINAPI
SVGSVGElement_createSVGPoint(ISVGSVGElement
*iface
, ISVGPoint
**p
)
521 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
522 FIXME("(%p)->(%p)\n", This
, p
);
526 static HRESULT WINAPI
SVGSVGElement_createSVGMatrix(ISVGSVGElement
*iface
, ISVGMatrix
**p
)
528 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
529 FIXME("(%p)->(%p)\n", This
, p
);
533 static HRESULT WINAPI
SVGSVGElement_createSVGRect(ISVGSVGElement
*iface
, ISVGRect
**p
)
535 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
536 FIXME("(%p)->(%p)\n", This
, p
);
540 static HRESULT WINAPI
SVGSVGElement_createSVGTransform(ISVGSVGElement
*iface
, ISVGTransform
**p
)
542 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
543 FIXME("(%p)->(%p)\n", This
, p
);
547 static HRESULT WINAPI
SVGSVGElement_createSVGTransformFromMatrix(ISVGSVGElement
*iface
,
548 ISVGMatrix
*matrix
, ISVGTransform
**p
)
550 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
551 FIXME("(%p)->(%p %p)\n", This
, matrix
, p
);
555 static HRESULT WINAPI
SVGSVGElement_getElementById(ISVGSVGElement
*iface
, BSTR id
, IHTMLElement
**p
)
557 SVGSVGElement
*This
= impl_from_ISVGSVGElement(iface
);
558 FIXME("(%p)->(%s %p)\n", This
, debugstr_w(id
), p
);
562 static const ISVGSVGElementVtbl SVGSVGElementVtbl
= {
563 SVGSVGElement_QueryInterface
,
564 SVGSVGElement_AddRef
,
565 SVGSVGElement_Release
,
566 SVGSVGElement_GetTypeInfoCount
,
567 SVGSVGElement_GetTypeInfo
,
568 SVGSVGElement_GetIDsOfNames
,
569 SVGSVGElement_Invoke
,
570 SVGSVGElement_putref_x
,
572 SVGSVGElement_putref_y
,
574 SVGSVGElement_putref_width
,
575 SVGSVGElement_get_width
,
576 SVGSVGElement_putref_height
,
577 SVGSVGElement_get_height
,
578 SVGSVGElement_put_contentScriptType
,
579 SVGSVGElement_get_contentScriptType
,
580 SVGSVGElement_put_contentStyleType
,
581 SVGSVGElement_get_contentStyleType
,
582 SVGSVGElement_putref_viewport
,
583 SVGSVGElement_get_viewport
,
584 SVGSVGElement_put_pixelUnitToMillimeterX
,
585 SVGSVGElement_get_pixelUnitToMillimeterX
,
586 SVGSVGElement_put_pixelUnitToMillimeterY
,
587 SVGSVGElement_get_pixelUnitToMillimeterY
,
588 SVGSVGElement_put_screenPixelToMillimeterX
,
589 SVGSVGElement_get_screenPixelToMillimeterX
,
590 SVGSVGElement_put_screenPixelToMillimeterY
,
591 SVGSVGElement_get_screenPixelToMillimeterY
,
592 SVGSVGElement_put_useCurrentView
,
593 SVGSVGElement_get_useCurrentView
,
594 SVGSVGElement_putref_currentView
,
595 SVGSVGElement_get_currentView
,
596 SVGSVGElement_put_currentScale
,
597 SVGSVGElement_get_currentScale
,
598 SVGSVGElement_putref_currentTranslate
,
599 SVGSVGElement_get_currentTranslate
,
600 SVGSVGElement_suspendRedraw
,
601 SVGSVGElement_unsuspendRedraw
,
602 SVGSVGElement_unsuspendRedrawAll
,
603 SVGSVGElement_forceRedraw
,
604 SVGSVGElement_pauseAnimations
,
605 SVGSVGElement_unpauseAnimations
,
606 SVGSVGElement_animationsPaused
,
607 SVGSVGElement_getCurrentTime
,
608 SVGSVGElement_setCurrentTime
,
609 SVGSVGElement_getIntersectionList
,
610 SVGSVGElement_getEnclosureList
,
611 SVGSVGElement_checkIntersection
,
612 SVGSVGElement_checkEnclosure
,
613 SVGSVGElement_deselectAll
,
614 SVGSVGElement_createSVGNumber
,
615 SVGSVGElement_createSVGLength
,
616 SVGSVGElement_createSVGAngle
,
617 SVGSVGElement_createSVGPoint
,
618 SVGSVGElement_createSVGMatrix
,
619 SVGSVGElement_createSVGRect
,
620 SVGSVGElement_createSVGTransform
,
621 SVGSVGElement_createSVGTransformFromMatrix
,
622 SVGSVGElement_getElementById
625 static inline SVGSVGElement
*SVGSVGElement_from_DispatchEx(DispatchEx
*iface
)
627 return CONTAINING_RECORD(iface
, SVGSVGElement
, svg_element
.element
.node
.event_target
.dispex
);
630 static void *SVGSVGElement_query_interface(DispatchEx
*dispex
, REFIID riid
)
632 SVGSVGElement
*This
= SVGSVGElement_from_DispatchEx(dispex
);
634 if(IsEqualGUID(&IID_ISVGSVGElement
, riid
))
635 return &This
->ISVGSVGElement_iface
;
637 return SVGElement_query_interface(&This
->svg_element
.element
.node
.event_target
.dispex
, riid
);
640 static const NodeImplVtbl SVGSVGElementImplVtbl
= {
641 .clsid
= &CLSID_SVGSVGElement
,
642 .cpc_entries
= HTMLElement_cpc
,
643 .clone
= HTMLElement_clone
,
644 .get_attr_col
= HTMLElement_get_attr_col
,
647 static const event_target_vtbl_t SVGSVGElement_event_target_vtbl
= {
649 HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
650 .query_interface
= SVGSVGElement_query_interface
,
651 .destructor
= HTMLElement_destructor
,
652 .traverse
= HTMLElement_traverse
,
653 .unlink
= HTMLElement_unlink
655 HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
656 .handle_event
= HTMLElement_handle_event
659 static dispex_static_data_t SVGSVGElement_dispex
= {
660 "HTMLUnknownElement",
661 &SVGSVGElement_event_target_vtbl
.dispex_vtbl
,
662 DispHTMLUnknownElement_tid
,
663 HTMLElement_iface_tids
,
664 HTMLElement_init_dispex_info
667 static HRESULT
create_viewport_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
671 ret
= calloc(1, sizeof(SVGSVGElement
));
673 return E_OUTOFMEMORY
;
675 ret
->ISVGSVGElement_iface
.lpVtbl
= &SVGSVGElementVtbl
;
676 ret
->svg_element
.element
.node
.vtbl
= &SVGSVGElementImplVtbl
;
678 init_svg_element(&ret
->svg_element
, doc
, nselem
, &SVGSVGElement_dispex
);
680 *elem
= &ret
->svg_element
.element
;
684 struct SVGCircleElement
{
685 SVGElement svg_element
;
686 ISVGCircleElement ISVGCircleElement_iface
;
689 static inline SVGCircleElement
*impl_from_ISVGCircleElement(ISVGCircleElement
*iface
)
691 return CONTAINING_RECORD(iface
, SVGCircleElement
, ISVGCircleElement_iface
);
694 DISPEX_IDISPATCH_IMPL(SVGCircleElement
, ISVGCircleElement
,
695 impl_from_ISVGCircleElement(iface
)->svg_element
.element
.node
.event_target
.dispex
)
697 static HRESULT WINAPI
SVGCircleElement_putref_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
699 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
700 FIXME("(%p)->(%p)\n", This
, v
);
704 static HRESULT WINAPI
SVGCircleElement_get_cx(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
706 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
707 FIXME("(%p)->(%p)\n", This
, p
);
711 static HRESULT WINAPI
SVGCircleElement_putref_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
713 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
714 FIXME("(%p)->(%p)\n", This
, v
);
718 static HRESULT WINAPI
SVGCircleElement_get_cy(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
720 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
721 FIXME("(%p)->(%p)\n", This
, p
);
725 static HRESULT WINAPI
SVGCircleElement_putref_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
*v
)
727 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
728 FIXME("(%p)->(%p)\n", This
, v
);
732 static HRESULT WINAPI
SVGCircleElement_get_r(ISVGCircleElement
*iface
, ISVGAnimatedLength
**p
)
734 SVGCircleElement
*This
= impl_from_ISVGCircleElement(iface
);
735 FIXME("(%p)->(%p)\n", This
, p
);
739 static const ISVGCircleElementVtbl SVGCircleElementVtbl
= {
740 SVGCircleElement_QueryInterface
,
741 SVGCircleElement_AddRef
,
742 SVGCircleElement_Release
,
743 SVGCircleElement_GetTypeInfoCount
,
744 SVGCircleElement_GetTypeInfo
,
745 SVGCircleElement_GetIDsOfNames
,
746 SVGCircleElement_Invoke
,
747 SVGCircleElement_putref_cx
,
748 SVGCircleElement_get_cx
,
749 SVGCircleElement_putref_cy
,
750 SVGCircleElement_get_cy
,
751 SVGCircleElement_putref_r
,
752 SVGCircleElement_get_r
755 static inline SVGCircleElement
*SVGCircleElement_from_DispatchEx(DispatchEx
*iface
)
757 return CONTAINING_RECORD(iface
, SVGCircleElement
, svg_element
.element
.node
.event_target
.dispex
);
760 static void *SVGCircleElement_query_interface(DispatchEx
*dispex
, REFIID riid
)
762 SVGCircleElement
*This
= SVGCircleElement_from_DispatchEx(dispex
);
764 if(IsEqualGUID(&IID_ISVGCircleElement
, riid
))
765 return &This
->ISVGCircleElement_iface
;
767 return SVGElement_query_interface(&This
->svg_element
.element
.node
.event_target
.dispex
, riid
);
770 static const NodeImplVtbl SVGCircleElementImplVtbl
= {
771 .clsid
= &CLSID_SVGCircleElement
,
772 .cpc_entries
= HTMLElement_cpc
,
773 .clone
= HTMLElement_clone
,
774 .get_attr_col
= HTMLElement_get_attr_col
,
777 static const event_target_vtbl_t SVGCircleElement_event_target_vtbl
= {
779 HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
780 .query_interface
= SVGCircleElement_query_interface
,
781 .destructor
= HTMLElement_destructor
,
782 .traverse
= HTMLElement_traverse
,
783 .unlink
= HTMLElement_unlink
785 HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
786 .handle_event
= HTMLElement_handle_event
789 static dispex_static_data_t SVGCircleElement_dispex
= {
790 "HTMLUnknownElement",
791 &SVGCircleElement_event_target_vtbl
.dispex_vtbl
,
792 DispHTMLUnknownElement_tid
,
793 HTMLElement_iface_tids
,
794 HTMLElement_init_dispex_info
797 static HRESULT
create_circle_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
799 SVGCircleElement
*ret
;
801 ret
= calloc(1, sizeof(SVGCircleElement
));
803 return E_OUTOFMEMORY
;
805 ret
->ISVGCircleElement_iface
.lpVtbl
= &SVGCircleElementVtbl
;
806 ret
->svg_element
.element
.node
.vtbl
= &SVGCircleElementImplVtbl
;
808 init_svg_element(&ret
->svg_element
, doc
, nselem
, &SVGCircleElement_dispex
);
810 *elem
= &ret
->svg_element
.element
;
815 ISVGTextContentElement ISVGTextContentElement_iface
;
816 SVGElement
*svg_element
;
817 } SVGTextContentElement
;
819 static inline SVGTextContentElement
*impl_from_ISVGTextContentElement(ISVGTextContentElement
*iface
)
821 return CONTAINING_RECORD(iface
, SVGTextContentElement
, ISVGTextContentElement_iface
);
824 DISPEX_IDISPATCH_IMPL(SVGTextContentElement
, ISVGTextContentElement
,
825 impl_from_ISVGTextContentElement(iface
)->svg_element
->element
.node
.event_target
.dispex
)
827 static HRESULT WINAPI
SVGTextContentElement_putref_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
*v
)
829 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
830 FIXME("(%p)->(%p)\n", This
, v
);
834 static HRESULT WINAPI
SVGTextContentElement_get_textLength(ISVGTextContentElement
*iface
, ISVGAnimatedLength
**p
)
836 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
837 FIXME("(%p)->(%p)\n", This
, p
);
841 static HRESULT WINAPI
SVGTextContentElement_putref_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
*v
)
843 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
844 FIXME("(%p)->(%p)\n", This
, v
);
848 static HRESULT WINAPI
SVGTextContentElement_get_lengthAdjust(ISVGTextContentElement
*iface
, ISVGAnimatedEnumeration
**p
)
850 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
851 FIXME("(%p)->(%p)\n", This
, p
);
855 static HRESULT WINAPI
SVGTextContentElement_getNumberOfChars(ISVGTextContentElement
*iface
, LONG
*p
)
857 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
858 FIXME("(%p)->(%p)\n", This
, p
);
862 static HRESULT WINAPI
SVGTextContentElement_getComputedTextLength(ISVGTextContentElement
*iface
, float *p
)
864 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
865 FIXME("(%p)->(%p)\n", This
, p
);
869 static HRESULT WINAPI
SVGTextContentElement_getSubStringLength(ISVGTextContentElement
*iface
,
870 LONG charnum
, LONG nchars
, float *p
)
872 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
873 FIXME("(%p)->(%ld %ld %p)\n", This
, charnum
, nchars
, p
);
877 static HRESULT WINAPI
SVGTextContentElement_getStartPositionOfChar(ISVGTextContentElement
*iface
,
878 LONG charnum
, ISVGPoint
**p
)
880 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
881 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
885 static HRESULT WINAPI
SVGTextContentElement_getEndPositionOfChar(ISVGTextContentElement
*iface
,
886 LONG charnum
, ISVGPoint
**p
)
888 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
889 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
893 static HRESULT WINAPI
SVGTextContentElement_getExtentOfChar(ISVGTextContentElement
*iface
,
894 LONG charnum
, ISVGRect
**p
)
896 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
897 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
901 static HRESULT WINAPI
SVGTextContentElement_getRotationOfChar(ISVGTextContentElement
*iface
,
902 LONG charnum
, float *p
)
904 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
905 FIXME("(%p)->(%ld %p)\n", This
, charnum
, p
);
909 static HRESULT WINAPI
SVGTextContentElement_getCharNumAtPosition(ISVGTextContentElement
*iface
,
910 ISVGPoint
*point
, LONG
*p
)
912 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
913 FIXME("(%p)->(%p %p)\n", This
, point
, p
);
917 static HRESULT WINAPI
SVGTextContentElement_selectSubString(ISVGTextContentElement
*iface
,
918 LONG charnum
, LONG nchars
)
920 SVGTextContentElement
*This
= impl_from_ISVGTextContentElement(iface
);
921 FIXME("(%p)->(%ld %ld)\n", This
, charnum
, nchars
);
925 static const ISVGTextContentElementVtbl SVGTextContentElementVtbl
= {
926 SVGTextContentElement_QueryInterface
,
927 SVGTextContentElement_AddRef
,
928 SVGTextContentElement_Release
,
929 SVGTextContentElement_GetTypeInfoCount
,
930 SVGTextContentElement_GetTypeInfo
,
931 SVGTextContentElement_GetIDsOfNames
,
932 SVGTextContentElement_Invoke
,
933 SVGTextContentElement_putref_textLength
,
934 SVGTextContentElement_get_textLength
,
935 SVGTextContentElement_putref_lengthAdjust
,
936 SVGTextContentElement_get_lengthAdjust
,
937 SVGTextContentElement_getNumberOfChars
,
938 SVGTextContentElement_getComputedTextLength
,
939 SVGTextContentElement_getSubStringLength
,
940 SVGTextContentElement_getStartPositionOfChar
,
941 SVGTextContentElement_getEndPositionOfChar
,
942 SVGTextContentElement_getExtentOfChar
,
943 SVGTextContentElement_getRotationOfChar
,
944 SVGTextContentElement_getCharNumAtPosition
,
945 SVGTextContentElement_selectSubString
948 static void init_text_content_element(SVGTextContentElement
*text_content
, SVGElement
*svg_element
)
950 text_content
->ISVGTextContentElement_iface
.lpVtbl
= &SVGTextContentElementVtbl
;
951 text_content
->svg_element
= svg_element
;
954 struct SVGTSpanElement
{
955 SVGElement svg_element
;
956 SVGTextContentElement text_content
;
959 static inline SVGTSpanElement
*SVGTSpanElement_from_DispatchEx(DispatchEx
*iface
)
961 return CONTAINING_RECORD(iface
, SVGTSpanElement
, svg_element
.element
.node
.event_target
.dispex
);
964 static void *SVGTSpanElement_query_interface(DispatchEx
*dispex
, REFIID riid
)
966 SVGTSpanElement
*This
= SVGTSpanElement_from_DispatchEx(dispex
);
968 if(IsEqualGUID(&IID_ISVGTSpanElement
, riid
))
969 return &This
->svg_element
.ISVGElement_iface
; /* no additional methods */
970 if(IsEqualGUID(&IID_ISVGTextContentElement
, riid
))
971 return &This
->text_content
.ISVGTextContentElement_iface
;
973 return SVGElement_query_interface(&This
->svg_element
.element
.node
.event_target
.dispex
, riid
);
976 static const NodeImplVtbl SVGTSpanElementImplVtbl
= {
977 .clsid
= &CLSID_SVGTSpanElement
,
978 .cpc_entries
= HTMLElement_cpc
,
979 .clone
= HTMLElement_clone
,
980 .get_attr_col
= HTMLElement_get_attr_col
,
983 static const event_target_vtbl_t SVGTSpanElement_event_target_vtbl
= {
985 HTMLELEMENT_DISPEX_VTBL_ENTRIES
,
986 .query_interface
= SVGTSpanElement_query_interface
,
987 .destructor
= HTMLElement_destructor
,
988 .traverse
= HTMLElement_traverse
,
989 .unlink
= HTMLElement_unlink
991 HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES
,
992 .handle_event
= HTMLElement_handle_event
995 static dispex_static_data_t SVGTSpanElement_dispex
= {
996 "HTMLUnknownElement",
997 &SVGTSpanElement_event_target_vtbl
.dispex_vtbl
,
998 DispHTMLUnknownElement_tid
,
999 HTMLElement_iface_tids
,
1000 HTMLElement_init_dispex_info
1003 static HRESULT
create_tspan_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*nselem
, HTMLElement
**elem
)
1005 SVGTSpanElement
*ret
;
1007 ret
= calloc(1, sizeof(SVGTSpanElement
));
1009 return E_OUTOFMEMORY
;
1011 ret
->svg_element
.element
.node
.vtbl
= &SVGTSpanElementImplVtbl
;
1012 init_text_content_element(&ret
->text_content
, &ret
->svg_element
);
1013 init_svg_element(&ret
->svg_element
, doc
, nselem
, &SVGTSpanElement_dispex
);
1015 *elem
= &ret
->svg_element
.element
;
1019 HRESULT
create_svg_element(HTMLDocumentNode
*doc
, nsIDOMSVGElement
*dom_element
, const WCHAR
*tag_name
, HTMLElement
**elem
)
1021 SVGElement
*svg_element
;
1023 TRACE("%s\n", debugstr_w(tag_name
));
1025 if(!wcscmp(tag_name
, L
"svg"))
1026 return create_viewport_element(doc
, dom_element
, elem
);
1027 if(!wcscmp(tag_name
, L
"circle"))
1028 return create_circle_element(doc
, dom_element
, elem
);
1029 if(!wcscmp(tag_name
, L
"tspan"))
1030 return create_tspan_element(doc
, dom_element
, elem
);
1032 svg_element
= calloc(1, sizeof(*svg_element
));
1034 return E_OUTOFMEMORY
;
1036 svg_element
->element
.node
.vtbl
= &SVGElementImplVtbl
;
1037 init_svg_element(svg_element
, doc
, dom_element
, &SVGElement_dispex
);
1038 *elem
= &svg_element
->element
;