mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00

We currently duplicate a lot of code to handle application/context menus and actions. The goal here is to hold the data for the menus and actions in LibWebView. Each UI will then be able to generate menus from the data on-the-fly. The structures added here are meant to support generic and checkable actions, action groups, submenus, etc.
24 lines
498 B
Objective-C
24 lines
498 B
Objective-C
/*
|
|
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Interface/Menu.h>
|
|
#include <LibWebView/Menu.h>
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
@class LadybirdWebView;
|
|
|
|
namespace Ladybird {
|
|
|
|
NSMenu* create_application_menu(WebView::Menu&);
|
|
NSMenu* create_context_menu(LadybirdWebView*, WebView::Menu&);
|
|
|
|
NSMenuItem* create_application_menu_item(WebView::Action&);
|
|
NSButton* create_application_button(WebView::Action&, NSImageName);
|
|
|
|
}
|