/* * Copyright (c) 2023-2024, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include #include #import @class Tab; @class TabController; @interface ApplicationDelegate : NSObject - (nullable instancetype)init; - (nonnull TabController*)createNewTab:(Optional const&)url fromTab:(nullable Tab*)tab activateTab:(Web::HTML::ActivateTab)activate_tab; - (nonnull TabController*)createNewTab:(StringView)html url:(URL::URL const&)url fromTab:(nullable Tab*)tab activateTab:(Web::HTML::ActivateTab)activate_tab; - (nonnull TabController*)createChildTab:(Optional const&)url fromTab:(nonnull Tab*)tab activateTab:(Web::HTML::ActivateTab)activate_tab pageIndex:(u64)page_index; - (void)setActiveTab:(nonnull Tab*)tab; - (nullable Tab*)activeTab; - (void)removeTab:(nonnull TabController*)controller; - (Web::CSS::PreferredColorScheme)preferredColorScheme; - (Web::CSS::PreferredContrast)preferredContrast; - (Web::CSS::PreferredMotion)preferredMotion; - (WebView::SearchEngine const&)searchEngine; @end