mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
Add native macOS global menu bar integration
Mirror UIMenuBar hierarchies into AppKit while keeping eepp menus as the source of truth. Add semantic item activation and menu lifecycle hooks so native actions, lazy menus, checkboxes, radio buttons, visibility, enabled state, and submenus preserve existing eepp behavior. Support shortcuts and standard About, Preferences, Quit, Window, Help, and Services menu integration. Keep the platform adapter private to the UI implementation and support safe installation, synchronization, and removal of the native menu. Migrate ecode away from its hand-written Cocoa menu, assign semantic menu roles, and populate the UI Language submenu synchronously so it is ready on its first opening. Add unit tests covering activation, menu lifecycle, roles, and submenu preparation. Refs: SpartanJ/ecode#823
This commit is contained in:
+15
-1
@@ -691,7 +691,7 @@ function generate_os_links()
|
||||
elseif os.is_real("mingw64") then
|
||||
multiple_insert( os_links, { "opengl32", "glu32", "gdi32", "ws2_32", "winmm", "ole32", "uuid", "dwrite" } )
|
||||
elseif os.is_real("macosx") then
|
||||
multiple_insert( os_links, { "OpenGL.framework", "CoreFoundation.framework", "CoreText.framework" } )
|
||||
multiple_insert( os_links, { "eepp-macos-helper-static", "Cocoa.framework", "OpenGL.framework", "CoreFoundation.framework", "CoreText.framework" } )
|
||||
elseif os.is_real("freebsd") then
|
||||
multiple_insert( os_links, { "rt", "pthread", "GL" } )
|
||||
elseif os.is_real("haiku") then
|
||||
@@ -1610,6 +1610,20 @@ solution "eepp"
|
||||
end
|
||||
build_base_cpp_configuration( "languages-syntax-highlighting" )
|
||||
|
||||
if os.is_real("macosx") then
|
||||
project "eepp-macos-helper-static"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
set_targetdir("libs/" .. os.get_real() .. "/")
|
||||
includedirs { "include", "src" }
|
||||
files { "src/eepp/ui/platform/macos/macosmenubar.m" }
|
||||
buildoptions { "-x objective-c++" }
|
||||
if not is_vs() then
|
||||
buildoptions{ "-std=c++20" }
|
||||
end
|
||||
build_base_cpp_configuration( "eepp-macos-helper" )
|
||||
end
|
||||
|
||||
-- Library
|
||||
if not _OPTIONS["disable-static-build"] then
|
||||
project "eepp-static"
|
||||
|
||||
Reference in New Issue
Block a user