Major production merge: GTK support, context menus, and dispatcher fixes
Core Infrastructure: - Add Dispatching folder with LinuxDispatcher, LinuxDispatcherProvider, LinuxDispatcherTimer - Add Native folder with P/Invoke wrappers (GTK, GLib, GDK, Cairo, WebKit) - Add GTK host window system with GtkHostWindow and GtkSkiaSurfaceWidget - Update LinuxApplication with GTK mode, theme handling, and icon support - Fix duplicate LinuxDispatcher in LinuxMauiContext Handlers: - Add GtkWebViewManager and GtkWebViewPlatformView for GTK WebView - Add FlexLayoutHandler and GestureManager - Update multiple handlers with ToViewHandler fix and missing mappers - Add MauiHandlerExtensions with ToViewHandler extension method Views: - Add SkiaContextMenu with hover, keyboard, and dark theme support - Add LinuxDialogService with context menu management - Add SkiaFlexLayout for flex container support - Update SkiaShell with RefreshTheme, MauiShell, ContentRenderer - Update SkiaWebView with SetMainWindow, ProcessGtkEvents - Update SkiaImage with LoadFromBitmap method Services: - Add AppInfoService, ConnectivityService, DeviceDisplayService, DeviceInfoService - Add GtkHostService, GtkContextMenuService, MauiIconGenerator Window: - Add CursorType enum and GtkHostWindow - Update X11Window with SetIcon, SetCursor methods Build: SUCCESS (0 errors) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
32
Services/GtkMenuItem.cs
Normal file
32
Services/GtkMenuItem.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Maui.Platform.Linux.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a menu item for use with GtkContextMenuService.
|
||||
/// </summary>
|
||||
public class GtkMenuItem
|
||||
{
|
||||
public string Text { get; }
|
||||
public Action? Action { get; }
|
||||
public bool IsEnabled { get; }
|
||||
public bool IsSeparator { get; }
|
||||
|
||||
public static GtkMenuItem Separator => new GtkMenuItem();
|
||||
|
||||
public GtkMenuItem(string text, Action? action, bool isEnabled = true)
|
||||
{
|
||||
Text = text;
|
||||
Action = action;
|
||||
IsEnabled = isEnabled;
|
||||
IsSeparator = false;
|
||||
}
|
||||
|
||||
private GtkMenuItem()
|
||||
{
|
||||
Text = "";
|
||||
Action = null;
|
||||
IsEnabled = false;
|
||||
IsSeparator = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user