mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:52:45 +00:00 
			
		
		
		
	 e221b3afeb
			
		
	
	
		e221b3afeb
		
	
	
	
	
		
			
			This will create a string of the form:
    Search DuckDuckGo for "Ladybird is awesome!"
If the provided query URL is unknown, the engine name is excluded (e.g.
for custom search URLs).
		
	
			
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			602 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Span.h>
 | |
| #include <AK/StringView.h>
 | |
| 
 | |
| namespace WebView {
 | |
| 
 | |
| struct SearchEngine {
 | |
|     StringView name;
 | |
|     StringView query_url;
 | |
| };
 | |
| 
 | |
| ReadonlySpan<SearchEngine> search_engines();
 | |
| SearchEngine const& default_search_engine();
 | |
| Optional<SearchEngine const&> find_search_engine_by_name(StringView name);
 | |
| Optional<SearchEngine const&> find_search_engine_by_query_url(StringView query_url);
 | |
| String format_search_query_for_display(StringView query_url, StringView query);
 | |
| 
 | |
| }
 |