mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 23:25:49 +01:00
This commit integrates iOS platform support for Wails v3, adapting the iOS-specific code to work with the new transport layer architecture. Key changes: - Add iOS-specific application, webview, and runtime files - Add iOS event types and processing - Add iOS examples and templates - Update messageprocessor to handle iOS requests - Move badge_ios.go to dock package Note: The iOS branch was based on an older v3-alpha and required significant conflict resolution due to the transport layer refactor (PR #4702). Some iOS-specific code may need further adaptation: - processIOSMethod needs to be implemented with new RuntimeRequest signature - iOS event generation in tasks/events/generate.go needs updating 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
904 B
Go
28 lines
904 B
Go
//go:build darwin && !ios
|
|
|
|
package application
|
|
|
|
const (
|
|
NSEventModifierFlagShift = 1 << 17 // Set if Shift key is pressed.
|
|
NSEventModifierFlagControl = 1 << 18 // Set if Control key is pressed.
|
|
NSEventModifierFlagOption = 1 << 19 // Set if Option or Alternate key is pressed.
|
|
NSEventModifierFlagCommand = 1 << 20 // Set if Command key is pressed.
|
|
)
|
|
|
|
// macModifierMap maps accelerator modifiers to macOS modifiers.
|
|
var macModifierMap = map[modifier]int{
|
|
CmdOrCtrlKey: NSEventModifierFlagCommand,
|
|
ControlKey: NSEventModifierFlagControl,
|
|
OptionOrAltKey: NSEventModifierFlagOption,
|
|
ShiftKey: NSEventModifierFlagShift,
|
|
SuperKey: NSEventModifierFlagCommand,
|
|
}
|
|
|
|
// toMacModifier converts the accelerator to a macOS modifier.
|
|
func toMacModifier(modifiers []modifier) int {
|
|
result := 0
|
|
for _, modifier := range modifiers {
|
|
result |= macModifierMap[modifier]
|
|
}
|
|
return result
|
|
}
|