mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 02:42:44 +00:00 
			
		
		
		
	 e9121f8b1f
			
		
	
	
		e9121f8b1f
		
	
	
	
	
		
			
			Core::deferred_invoke is a way of executing an action after previously queued events have been processed. It removes the requirement of having/being a Core::Object subclass in order to defer invocation through Core::Object::deferred_invoke. Core::Object::deferred_invoke now delegates to Core::deferred_invoke. The version with the Object& argument is still present but will be removed in the following commits. This commit additionally fixes a new places where the DeferredInvocationEvent was dispatched to the event loop directly, and replaces them with the Core::deferred_invoke equivalent.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, sin-ack <sin-ack@protonmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibCore/Object.h>
 | |
| 
 | |
| namespace Core {
 | |
| 
 | |
| class DeferredInvocationContext final : public Core::Object {
 | |
|     C_OBJECT(DeferredInvocationContext)
 | |
| private:
 | |
|     DeferredInvocationContext() { }
 | |
| };
 | |
| 
 | |
| }
 |