mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	 f87041bf3a
			
		
	
	
		f87041bf3a
		
	
	
	
	
		
			
			Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
		
			
				
	
	
		
			60 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibWeb/Bindings/AudioScheduledSourceNodePrototype.h>
 | |
| #include <LibWeb/Bindings/Intrinsics.h>
 | |
| #include <LibWeb/HTML/EventNames.h>
 | |
| #include <LibWeb/WebAudio/AudioScheduledSourceNode.h>
 | |
| 
 | |
| namespace Web::WebAudio {
 | |
| 
 | |
| GC_DEFINE_ALLOCATOR(AudioScheduledSourceNode);
 | |
| 
 | |
| AudioScheduledSourceNode::AudioScheduledSourceNode(JS::Realm& realm, GC::Ref<BaseAudioContext> context)
 | |
|     : AudioNode(realm, context)
 | |
| {
 | |
| }
 | |
| 
 | |
| AudioScheduledSourceNode::~AudioScheduledSourceNode() = default;
 | |
| 
 | |
| // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-onended
 | |
| GC::Ptr<WebIDL::CallbackType> AudioScheduledSourceNode::onended()
 | |
| {
 | |
|     return event_handler_attribute(HTML::EventNames::ended);
 | |
| }
 | |
| 
 | |
| // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-onended
 | |
| void AudioScheduledSourceNode::set_onended(GC::Ptr<WebIDL::CallbackType> value)
 | |
| {
 | |
|     set_event_handler_attribute(HTML::EventNames::ended, value);
 | |
| }
 | |
| 
 | |
| // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-start
 | |
| WebIDL::ExceptionOr<void> AudioScheduledSourceNode::start(double when)
 | |
| {
 | |
|     (void)when;
 | |
|     return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement AudioScheduledSourceNode::start"_string);
 | |
| }
 | |
| 
 | |
| // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-stop
 | |
| WebIDL::ExceptionOr<void> AudioScheduledSourceNode::stop(double when)
 | |
| {
 | |
|     (void)when;
 | |
|     return WebIDL::NotSupportedError::create(realm(), "FIXME: Implement AudioScheduledSourceNode::stop"_string);
 | |
| }
 | |
| 
 | |
| void AudioScheduledSourceNode::initialize(JS::Realm& realm)
 | |
| {
 | |
|     Base::initialize(realm);
 | |
|     WEB_SET_PROTOTYPE_FOR_INTERFACE(AudioScheduledSourceNode);
 | |
| }
 | |
| 
 | |
| void AudioScheduledSourceNode::visit_edges(Cell::Visitor& visitor)
 | |
| {
 | |
|     Base::visit_edges(visitor);
 | |
| }
 | |
| 
 | |
| }
 |