From b4c4cd8ae8262dcb3ce432c7f8eebb18445bf219 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 2 Feb 2025 10:22:11 +1100 Subject: [PATCH] Fix mac/js events --- docs/src/content/docs/changelog.mdx | 1 + .../desktop/@wailsio/runtime/package.json | 2 +- .../@wailsio/runtime/src/event_types.js | 30 +- .../@wailsio/runtime/types/event_types.d.ts | 16 +- .../application/application_darwin_delegate.m | 6 +- v3/pkg/events/events.go | 953 +++++++++--------- v3/pkg/events/events.txt | 16 +- v3/pkg/events/events_darwin.h | 74 +- v3/tasks/events/generate.go | 6 +- 9 files changed, 561 insertions(+), 543 deletions(-) diff --git a/docs/src/content/docs/changelog.mdx b/docs/src/content/docs/changelog.mdx index 4556e6f19..982a5b464 100644 --- a/docs/src/content/docs/changelog.mdx +++ b/docs/src/content/docs/changelog.mdx @@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed use-before-define errors in binding generator output by [@fbbdev](https://github.com/fbbdev) in [#4001](https://github.com/wailsapp/wails/pull/4001) - Pass build flags to binding generator by [@fbbdev](https://github.com/fbbdev) in [#4023](https://github.com/wailsapp/wails/pull/4023) - Change paths in windows Taskfile to forward slashes to ensure it works on non-Windows platforms by [@leaanthony](https://github.com/leaanthony) +- Mac + Mac JS events now fixed by [@leaanthony](https://github.com/leaanthony) ### Changed diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/package.json b/v3/internal/runtime/desktop/@wailsio/runtime/package.json index 2d083736a..ec736b3a1 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/package.json +++ b/v3/internal/runtime/desktop/@wailsio/runtime/package.json @@ -1,7 +1,7 @@ { "name": "@wailsio/runtime", "type": "module", - "version": "3.0.0-alpha.49", + "version": "3.0.0-alpha.54", "description": "Wails Runtime", "types": "types/index.d.ts", "exports": { diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js b/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js index 8ab8bcdd5..9c7feed7c 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js @@ -28,8 +28,6 @@ export const EventTypes = { WindowKeyDown: "windows:WindowKeyDown", WindowKeyUp: "windows:WindowKeyUp", WindowKillFocus: "windows:WindowKillFocus", - WindowMaximise: "windows:WindowMaximise", - WindowMinimise: "windows:WindowMinimise", WindowNonClientHit: "windows:WindowNonClientHit", WindowNonClientMouseDown: "windows:WindowNonClientMouseDown", WindowNonClientMouseLeave: "windows:WindowNonClientMouseLeave", @@ -42,9 +40,11 @@ export const EventTypes = { WindowStartMove: "windows:WindowStartMove", WindowStartResize: "windows:WindowStartResize", WindowUnFullscreen: "windows:WindowUnFullscreen", - WindowUnMaximise: "windows:WindowUnMaximise", - WindowUnMinimise: "windows:WindowUnMinimise", WindowZOrderChanged: "windows:WindowZOrderChanged", + WindowMinimise: "windows:WindowMinimise", + WindowUnMinimise: "windows:WindowUnMinimise", + WindowMaximise: "windows:WindowMaximise", + WindowUnMaximise: "windows:WindowUnMaximise", }, Mac: { ApplicationDidBecomeActive: "mac:ApplicationDidBecomeActive", @@ -55,13 +55,13 @@ export const EventTypes = { ApplicationDidChangeScreenParameters: "mac:ApplicationDidChangeScreenParameters", ApplicationDidChangeStatusBarFrame: "mac:ApplicationDidChangeStatusBarFrame", ApplicationDidChangeStatusBarOrientation: "mac:ApplicationDidChangeStatusBarOrientation", - ApplicationDidChangeTheme: "mac:ApplicationDidChangeTheme!", + ApplicationDidChangeTheme: "mac:ApplicationDidChangeTheme", ApplicationDidFinishLaunching: "mac:ApplicationDidFinishLaunching", ApplicationDidHide: "mac:ApplicationDidHide", - ApplicationDidResignActiveNotification: "mac:ApplicationDidResignActiveNotification", + ApplicationDidResignActive: "mac:ApplicationDidResignActive", ApplicationDidUnhide: "mac:ApplicationDidUnhide", ApplicationDidUpdate: "mac:ApplicationDidUpdate", - ApplicationShouldHandleReopen: "mac:ApplicationShouldHandleReopen!", + ApplicationShouldHandleReopen: "mac:ApplicationShouldHandleReopen", ApplicationWillBecomeActive: "mac:ApplicationWillBecomeActive", ApplicationWillFinishLaunching: "mac:ApplicationWillFinishLaunching", ApplicationWillHide: "mac:ApplicationWillHide", @@ -138,15 +138,17 @@ export const EventTypes = { WindowDidUpdateShadow: "mac:WindowDidUpdateShadow", WindowDidUpdateTitle: "mac:WindowDidUpdateTitle", WindowDidUpdateToolbar: "mac:WindowDidUpdateToolbar", - WindowDidZoom: "mac:WindowDidZoom!", + WindowDidZoom: "mac:WindowDidZoom", WindowFileDraggingEntered: "mac:WindowFileDraggingEntered", WindowFileDraggingExited: "mac:WindowFileDraggingExited", WindowFileDraggingPerformed: "mac:WindowFileDraggingPerformed", WindowHide: "mac:WindowHide", - WindowMaximize: "mac:WindowMaximize", - WindowShouldClose: "mac:WindowShouldClose!", - WindowShow: "mac:WindowShow", + WindowMaximise: "mac:WindowMaximise", WindowUnMaximise: "mac:WindowUnMaximise", + WindowMinimise: "mac:WindowMinimise", + WindowUnMinimise: "mac:WindowUnMinimise", + WindowShouldClose: "mac:WindowShouldClose", + WindowShow: "mac:WindowShow", WindowWillBecomeKey: "mac:WindowWillBecomeKey", WindowWillBecomeMain: "mac:WindowWillBecomeMain", WindowWillBeginSheet: "mac:WindowWillBeginSheet", @@ -174,9 +176,9 @@ export const EventTypes = { WindowWillUpdateToolbar: "mac:WindowWillUpdateToolbar", WindowWillUpdateVisibility: "mac:WindowWillUpdateVisibility", WindowWillUseStandardFrame: "mac:WindowWillUseStandardFrame", - WindowZoomIn: "mac:WindowZoomIn!", - WindowZoomOut: "mac:WindowZoomOut!", - WindowZoomReset: "mac:WindowZoomReset!", + WindowZoomIn: "mac:WindowZoomIn", + WindowZoomOut: "mac:WindowZoomOut", + WindowZoomReset: "mac:WindowZoomReset", }, Linux: { ApplicationStartup: "linux:ApplicationStartup", diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts b/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts index c434a3f52..e8742de59 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts +++ b/v3/internal/runtime/desktop/@wailsio/runtime/types/event_types.d.ts @@ -28,8 +28,6 @@ export declare const EventTypes: { WindowKeyDown: string, WindowKeyUp: string, WindowKillFocus: string, - WindowMaximise: string, - WindowMinimise: string, WindowNonClientHit: string, WindowNonClientMouseDown: string, WindowNonClientMouseLeave: string, @@ -42,9 +40,11 @@ export declare const EventTypes: { WindowStartMove: string, WindowStartResize: string, WindowUnFullscreen: string, - WindowUnMaximise: string, - WindowUnMinimise: string, WindowZOrderChanged: string, + WindowMinimise: string, + WindowUnMinimise: string, + WindowMaximise: string, + WindowUnMaximise: string, }, Mac: { ApplicationDidBecomeActive: string, @@ -58,7 +58,7 @@ export declare const EventTypes: { ApplicationDidChangeTheme: string, ApplicationDidFinishLaunching: string, ApplicationDidHide: string, - ApplicationDidResignActiveNotification: string, + ApplicationDidResignActive: string, ApplicationDidUnhide: string, ApplicationDidUpdate: string, ApplicationShouldHandleReopen: string, @@ -143,10 +143,12 @@ export declare const EventTypes: { WindowFileDraggingExited: string, WindowFileDraggingPerformed: string, WindowHide: string, - WindowMaximize: string, + WindowMaximise: string, + WindowUnMaximise: string, + WindowMinimise: string, + WindowUnMinimise: string, WindowShouldClose: string, WindowShow: string, - WindowUnMaximise: string, WindowWillBecomeKey: string, WindowWillBecomeMain: string, WindowWillBeginSheet: string, diff --git a/v3/pkg/application/application_darwin_delegate.m b/v3/pkg/application/application_darwin_delegate.m index 9831b7172..117968d0a 100644 --- a/v3/pkg/application/application_darwin_delegate.m +++ b/v3/pkg/application/application_darwin_delegate.m @@ -117,9 +117,9 @@ extern void handleSecondInstanceData(char * message); } } -- (void)applicationDidResignActiveNotification:(NSNotification *)notification { - if( hasListeners(EventApplicationDidResignActiveNotification) ) { - processApplicationEvent(EventApplicationDidResignActiveNotification, NULL); +- (void)applicationDidResignActive:(NSNotification *)notification { + if( hasListeners(EventApplicationDidResignActive) ) { + processApplicationEvent(EventApplicationDidResignActive, NULL); } } diff --git a/v3/pkg/events/events.go b/v3/pkg/events/events.go index 0d467848c..13851411d 100644 --- a/v3/pkg/events/events.go +++ b/v3/pkg/events/events.go @@ -1,63 +1,63 @@ package events type ApplicationEventType uint -type WindowEventType uint +type WindowEventType uint var Common = newCommonEvents() type commonEvents struct { ApplicationOpenedWithFile ApplicationEventType - ApplicationStarted ApplicationEventType - ThemeChanged ApplicationEventType - WindowClosing WindowEventType - WindowDidMove WindowEventType - WindowDidResize WindowEventType - WindowDPIChanged WindowEventType - WindowFilesDropped WindowEventType - WindowFocus WindowEventType - WindowFullscreen WindowEventType - WindowHide WindowEventType - WindowLostFocus WindowEventType - WindowMaximise WindowEventType - WindowMinimise WindowEventType - WindowRestore WindowEventType - WindowRuntimeReady WindowEventType - WindowShow WindowEventType - WindowUnFullscreen WindowEventType - WindowUnMaximise WindowEventType - WindowUnMinimise WindowEventType - WindowZoom WindowEventType - WindowZoomIn WindowEventType - WindowZoomOut WindowEventType - WindowZoomReset WindowEventType + ApplicationStarted ApplicationEventType + ThemeChanged ApplicationEventType + WindowClosing WindowEventType + WindowDidMove WindowEventType + WindowDidResize WindowEventType + WindowDPIChanged WindowEventType + WindowFilesDropped WindowEventType + WindowFocus WindowEventType + WindowFullscreen WindowEventType + WindowHide WindowEventType + WindowLostFocus WindowEventType + WindowMaximise WindowEventType + WindowMinimise WindowEventType + WindowRestore WindowEventType + WindowRuntimeReady WindowEventType + WindowShow WindowEventType + WindowUnFullscreen WindowEventType + WindowUnMaximise WindowEventType + WindowUnMinimise WindowEventType + WindowZoom WindowEventType + WindowZoomIn WindowEventType + WindowZoomOut WindowEventType + WindowZoomReset WindowEventType } func newCommonEvents() commonEvents { return commonEvents{ ApplicationOpenedWithFile: 1024, - ApplicationStarted: 1025, - ThemeChanged: 1026, - WindowClosing: 1027, - WindowDidMove: 1028, - WindowDidResize: 1029, - WindowDPIChanged: 1030, - WindowFilesDropped: 1031, - WindowFocus: 1032, - WindowFullscreen: 1033, - WindowHide: 1034, - WindowLostFocus: 1035, - WindowMaximise: 1036, - WindowMinimise: 1037, - WindowRestore: 1038, - WindowRuntimeReady: 1039, - WindowShow: 1040, - WindowUnFullscreen: 1041, - WindowUnMaximise: 1042, - WindowUnMinimise: 1043, - WindowZoom: 1044, - WindowZoomIn: 1045, - WindowZoomOut: 1046, - WindowZoomReset: 1047, + ApplicationStarted: 1025, + ThemeChanged: 1026, + WindowClosing: 1027, + WindowDidMove: 1028, + WindowDidResize: 1029, + WindowDPIChanged: 1030, + WindowFilesDropped: 1031, + WindowFocus: 1032, + WindowFullscreen: 1033, + WindowHide: 1034, + WindowLostFocus: 1035, + WindowMaximise: 1036, + WindowMinimise: 1037, + WindowRestore: 1038, + WindowRuntimeReady: 1039, + WindowShow: 1040, + WindowUnFullscreen: 1041, + WindowUnMaximise: 1042, + WindowUnMinimise: 1043, + WindowZoom: 1044, + WindowZoomIn: 1045, + WindowZoomOut: 1046, + WindowZoomReset: 1047, } } @@ -66,392 +66,396 @@ var Linux = newLinuxEvents() type linuxEvents struct { ApplicationStartup ApplicationEventType SystemThemeChanged ApplicationEventType - WindowDeleteEvent WindowEventType - WindowDidMove WindowEventType - WindowDidResize WindowEventType - WindowFocusIn WindowEventType - WindowFocusOut WindowEventType - WindowLoadChanged WindowEventType + WindowDeleteEvent WindowEventType + WindowDidMove WindowEventType + WindowDidResize WindowEventType + WindowFocusIn WindowEventType + WindowFocusOut WindowEventType + WindowLoadChanged WindowEventType } func newLinuxEvents() linuxEvents { return linuxEvents{ ApplicationStartup: 1048, SystemThemeChanged: 1049, - WindowDeleteEvent: 1050, - WindowDidMove: 1051, - WindowDidResize: 1052, - WindowFocusIn: 1053, - WindowFocusOut: 1054, - WindowLoadChanged: 1055, + WindowDeleteEvent: 1050, + WindowDidMove: 1051, + WindowDidResize: 1052, + WindowFocusIn: 1053, + WindowFocusOut: 1054, + WindowLoadChanged: 1055, } } var Mac = newMacEvents() type macEvents struct { - ApplicationDidBecomeActive ApplicationEventType - ApplicationDidChangeBackingProperties ApplicationEventType - ApplicationDidChangeEffectiveAppearance ApplicationEventType - ApplicationDidChangeIcon ApplicationEventType - ApplicationDidChangeOcclusionState ApplicationEventType - ApplicationDidChangeScreenParameters ApplicationEventType - ApplicationDidChangeStatusBarFrame ApplicationEventType - ApplicationDidChangeStatusBarOrientation ApplicationEventType - ApplicationDidChangeTheme ApplicationEventType - ApplicationDidFinishLaunching ApplicationEventType - ApplicationDidHide ApplicationEventType - ApplicationDidResignActiveNotification ApplicationEventType - ApplicationDidUnhide ApplicationEventType - ApplicationDidUpdate ApplicationEventType - ApplicationShouldHandleReopen ApplicationEventType - ApplicationWillBecomeActive ApplicationEventType - ApplicationWillFinishLaunching ApplicationEventType - ApplicationWillHide ApplicationEventType - ApplicationWillResignActive ApplicationEventType - ApplicationWillTerminate ApplicationEventType - ApplicationWillUnhide ApplicationEventType - ApplicationWillUpdate ApplicationEventType - MenuDidAddItem ApplicationEventType - MenuDidBeginTracking ApplicationEventType - MenuDidClose ApplicationEventType - MenuDidDisplayItem ApplicationEventType - MenuDidEndTracking ApplicationEventType - MenuDidHighlightItem ApplicationEventType - MenuDidOpen ApplicationEventType - MenuDidPopUp ApplicationEventType - MenuDidRemoveItem ApplicationEventType - MenuDidSendAction ApplicationEventType - MenuDidSendActionToItem ApplicationEventType - MenuDidUpdate ApplicationEventType - MenuWillAddItem ApplicationEventType - MenuWillBeginTracking ApplicationEventType - MenuWillDisplayItem ApplicationEventType - MenuWillEndTracking ApplicationEventType - MenuWillHighlightItem ApplicationEventType - MenuWillOpen ApplicationEventType - MenuWillPopUp ApplicationEventType - MenuWillRemoveItem ApplicationEventType - MenuWillSendAction ApplicationEventType - MenuWillSendActionToItem ApplicationEventType - MenuWillUpdate ApplicationEventType - WebViewDidCommitNavigation WindowEventType - WebViewDidFinishNavigation WindowEventType + ApplicationDidBecomeActive ApplicationEventType + ApplicationDidChangeBackingProperties ApplicationEventType + ApplicationDidChangeEffectiveAppearance ApplicationEventType + ApplicationDidChangeIcon ApplicationEventType + ApplicationDidChangeOcclusionState ApplicationEventType + ApplicationDidChangeScreenParameters ApplicationEventType + ApplicationDidChangeStatusBarFrame ApplicationEventType + ApplicationDidChangeStatusBarOrientation ApplicationEventType + ApplicationDidChangeTheme ApplicationEventType + ApplicationDidFinishLaunching ApplicationEventType + ApplicationDidHide ApplicationEventType + ApplicationDidResignActive ApplicationEventType + ApplicationDidUnhide ApplicationEventType + ApplicationDidUpdate ApplicationEventType + ApplicationShouldHandleReopen ApplicationEventType + ApplicationWillBecomeActive ApplicationEventType + ApplicationWillFinishLaunching ApplicationEventType + ApplicationWillHide ApplicationEventType + ApplicationWillResignActive ApplicationEventType + ApplicationWillTerminate ApplicationEventType + ApplicationWillUnhide ApplicationEventType + ApplicationWillUpdate ApplicationEventType + MenuDidAddItem ApplicationEventType + MenuDidBeginTracking ApplicationEventType + MenuDidClose ApplicationEventType + MenuDidDisplayItem ApplicationEventType + MenuDidEndTracking ApplicationEventType + MenuDidHighlightItem ApplicationEventType + MenuDidOpen ApplicationEventType + MenuDidPopUp ApplicationEventType + MenuDidRemoveItem ApplicationEventType + MenuDidSendAction ApplicationEventType + MenuDidSendActionToItem ApplicationEventType + MenuDidUpdate ApplicationEventType + MenuWillAddItem ApplicationEventType + MenuWillBeginTracking ApplicationEventType + MenuWillDisplayItem ApplicationEventType + MenuWillEndTracking ApplicationEventType + MenuWillHighlightItem ApplicationEventType + MenuWillOpen ApplicationEventType + MenuWillPopUp ApplicationEventType + MenuWillRemoveItem ApplicationEventType + MenuWillSendAction ApplicationEventType + MenuWillSendActionToItem ApplicationEventType + MenuWillUpdate ApplicationEventType + WebViewDidCommitNavigation WindowEventType + WebViewDidFinishNavigation WindowEventType WebViewDidReceiveServerRedirectForProvisionalNavigation WindowEventType - WebViewDidStartProvisionalNavigation WindowEventType - WindowDidBecomeKey WindowEventType - WindowDidBecomeMain WindowEventType - WindowDidBeginSheet WindowEventType - WindowDidChangeAlpha WindowEventType - WindowDidChangeBackingLocation WindowEventType - WindowDidChangeBackingProperties WindowEventType - WindowDidChangeCollectionBehavior WindowEventType - WindowDidChangeEffectiveAppearance WindowEventType - WindowDidChangeOcclusionState WindowEventType - WindowDidChangeOrderingMode WindowEventType - WindowDidChangeScreen WindowEventType - WindowDidChangeScreenParameters WindowEventType - WindowDidChangeScreenProfile WindowEventType - WindowDidChangeScreenSpace WindowEventType - WindowDidChangeScreenSpaceProperties WindowEventType - WindowDidChangeSharingType WindowEventType - WindowDidChangeSpace WindowEventType - WindowDidChangeSpaceOrderingMode WindowEventType - WindowDidChangeTitle WindowEventType - WindowDidChangeToolbar WindowEventType - WindowDidDeminiaturize WindowEventType - WindowDidEndSheet WindowEventType - WindowDidEnterFullScreen WindowEventType - WindowDidEnterVersionBrowser WindowEventType - WindowDidExitFullScreen WindowEventType - WindowDidExitVersionBrowser WindowEventType - WindowDidExpose WindowEventType - WindowDidFocus WindowEventType - WindowDidMiniaturize WindowEventType - WindowDidMove WindowEventType - WindowDidOrderOffScreen WindowEventType - WindowDidOrderOnScreen WindowEventType - WindowDidResignKey WindowEventType - WindowDidResignMain WindowEventType - WindowDidResize WindowEventType - WindowDidUpdate WindowEventType - WindowDidUpdateAlpha WindowEventType - WindowDidUpdateCollectionBehavior WindowEventType - WindowDidUpdateCollectionProperties WindowEventType - WindowDidUpdateShadow WindowEventType - WindowDidUpdateTitle WindowEventType - WindowDidUpdateToolbar WindowEventType - WindowDidZoom WindowEventType - WindowFileDraggingEntered WindowEventType - WindowFileDraggingExited WindowEventType - WindowFileDraggingPerformed WindowEventType - WindowHide WindowEventType - WindowMaximize WindowEventType - WindowShouldClose WindowEventType - WindowShow WindowEventType - WindowUnMaximise WindowEventType - WindowWillBecomeKey WindowEventType - WindowWillBecomeMain WindowEventType - WindowWillBeginSheet WindowEventType - WindowWillChangeOrderingMode WindowEventType - WindowWillClose WindowEventType - WindowWillDeminiaturize WindowEventType - WindowWillEnterFullScreen WindowEventType - WindowWillEnterVersionBrowser WindowEventType - WindowWillExitFullScreen WindowEventType - WindowWillExitVersionBrowser WindowEventType - WindowWillFocus WindowEventType - WindowWillMiniaturize WindowEventType - WindowWillMove WindowEventType - WindowWillOrderOffScreen WindowEventType - WindowWillOrderOnScreen WindowEventType - WindowWillResignMain WindowEventType - WindowWillResize WindowEventType - WindowWillUnfocus WindowEventType - WindowWillUpdate WindowEventType - WindowWillUpdateAlpha WindowEventType - WindowWillUpdateCollectionBehavior WindowEventType - WindowWillUpdateCollectionProperties WindowEventType - WindowWillUpdateShadow WindowEventType - WindowWillUpdateTitle WindowEventType - WindowWillUpdateToolbar WindowEventType - WindowWillUpdateVisibility WindowEventType - WindowWillUseStandardFrame WindowEventType - WindowZoomIn WindowEventType - WindowZoomOut WindowEventType - WindowZoomReset WindowEventType + WebViewDidStartProvisionalNavigation WindowEventType + WindowDidBecomeKey WindowEventType + WindowDidBecomeMain WindowEventType + WindowDidBeginSheet WindowEventType + WindowDidChangeAlpha WindowEventType + WindowDidChangeBackingLocation WindowEventType + WindowDidChangeBackingProperties WindowEventType + WindowDidChangeCollectionBehavior WindowEventType + WindowDidChangeEffectiveAppearance WindowEventType + WindowDidChangeOcclusionState WindowEventType + WindowDidChangeOrderingMode WindowEventType + WindowDidChangeScreen WindowEventType + WindowDidChangeScreenParameters WindowEventType + WindowDidChangeScreenProfile WindowEventType + WindowDidChangeScreenSpace WindowEventType + WindowDidChangeScreenSpaceProperties WindowEventType + WindowDidChangeSharingType WindowEventType + WindowDidChangeSpace WindowEventType + WindowDidChangeSpaceOrderingMode WindowEventType + WindowDidChangeTitle WindowEventType + WindowDidChangeToolbar WindowEventType + WindowDidDeminiaturize WindowEventType + WindowDidEndSheet WindowEventType + WindowDidEnterFullScreen WindowEventType + WindowDidEnterVersionBrowser WindowEventType + WindowDidExitFullScreen WindowEventType + WindowDidExitVersionBrowser WindowEventType + WindowDidExpose WindowEventType + WindowDidFocus WindowEventType + WindowDidMiniaturize WindowEventType + WindowDidMove WindowEventType + WindowDidOrderOffScreen WindowEventType + WindowDidOrderOnScreen WindowEventType + WindowDidResignKey WindowEventType + WindowDidResignMain WindowEventType + WindowDidResize WindowEventType + WindowDidUpdate WindowEventType + WindowDidUpdateAlpha WindowEventType + WindowDidUpdateCollectionBehavior WindowEventType + WindowDidUpdateCollectionProperties WindowEventType + WindowDidUpdateShadow WindowEventType + WindowDidUpdateTitle WindowEventType + WindowDidUpdateToolbar WindowEventType + WindowDidZoom WindowEventType + WindowFileDraggingEntered WindowEventType + WindowFileDraggingExited WindowEventType + WindowFileDraggingPerformed WindowEventType + WindowHide WindowEventType + WindowMaximise WindowEventType + WindowUnMaximise WindowEventType + WindowMinimise WindowEventType + WindowUnMinimise WindowEventType + WindowShouldClose WindowEventType + WindowShow WindowEventType + WindowWillBecomeKey WindowEventType + WindowWillBecomeMain WindowEventType + WindowWillBeginSheet WindowEventType + WindowWillChangeOrderingMode WindowEventType + WindowWillClose WindowEventType + WindowWillDeminiaturize WindowEventType + WindowWillEnterFullScreen WindowEventType + WindowWillEnterVersionBrowser WindowEventType + WindowWillExitFullScreen WindowEventType + WindowWillExitVersionBrowser WindowEventType + WindowWillFocus WindowEventType + WindowWillMiniaturize WindowEventType + WindowWillMove WindowEventType + WindowWillOrderOffScreen WindowEventType + WindowWillOrderOnScreen WindowEventType + WindowWillResignMain WindowEventType + WindowWillResize WindowEventType + WindowWillUnfocus WindowEventType + WindowWillUpdate WindowEventType + WindowWillUpdateAlpha WindowEventType + WindowWillUpdateCollectionBehavior WindowEventType + WindowWillUpdateCollectionProperties WindowEventType + WindowWillUpdateShadow WindowEventType + WindowWillUpdateTitle WindowEventType + WindowWillUpdateToolbar WindowEventType + WindowWillUpdateVisibility WindowEventType + WindowWillUseStandardFrame WindowEventType + WindowZoomIn WindowEventType + WindowZoomOut WindowEventType + WindowZoomReset WindowEventType } func newMacEvents() macEvents { return macEvents{ - ApplicationDidBecomeActive: 1056, - ApplicationDidChangeBackingProperties: 1057, - ApplicationDidChangeEffectiveAppearance: 1058, - ApplicationDidChangeIcon: 1059, - ApplicationDidChangeOcclusionState: 1060, - ApplicationDidChangeScreenParameters: 1061, - ApplicationDidChangeStatusBarFrame: 1062, + ApplicationDidBecomeActive: 1056, + ApplicationDidChangeBackingProperties: 1057, + ApplicationDidChangeEffectiveAppearance: 1058, + ApplicationDidChangeIcon: 1059, + ApplicationDidChangeOcclusionState: 1060, + ApplicationDidChangeScreenParameters: 1061, + ApplicationDidChangeStatusBarFrame: 1062, ApplicationDidChangeStatusBarOrientation: 1063, - ApplicationDidChangeTheme: 1064, - ApplicationDidFinishLaunching: 1065, - ApplicationDidHide: 1066, - ApplicationDidResignActiveNotification: 1067, - ApplicationDidUnhide: 1068, - ApplicationDidUpdate: 1069, - ApplicationShouldHandleReopen: 1070, - ApplicationWillBecomeActive: 1071, - ApplicationWillFinishLaunching: 1072, - ApplicationWillHide: 1073, - ApplicationWillResignActive: 1074, - ApplicationWillTerminate: 1075, - ApplicationWillUnhide: 1076, - ApplicationWillUpdate: 1077, - MenuDidAddItem: 1078, - MenuDidBeginTracking: 1079, - MenuDidClose: 1080, - MenuDidDisplayItem: 1081, - MenuDidEndTracking: 1082, - MenuDidHighlightItem: 1083, - MenuDidOpen: 1084, - MenuDidPopUp: 1085, - MenuDidRemoveItem: 1086, - MenuDidSendAction: 1087, - MenuDidSendActionToItem: 1088, - MenuDidUpdate: 1089, - MenuWillAddItem: 1090, - MenuWillBeginTracking: 1091, - MenuWillDisplayItem: 1092, - MenuWillEndTracking: 1093, - MenuWillHighlightItem: 1094, - MenuWillOpen: 1095, - MenuWillPopUp: 1096, - MenuWillRemoveItem: 1097, - MenuWillSendAction: 1098, - MenuWillSendActionToItem: 1099, - MenuWillUpdate: 1100, - WebViewDidCommitNavigation: 1101, - WebViewDidFinishNavigation: 1102, + ApplicationDidChangeTheme: 1064, + ApplicationDidFinishLaunching: 1065, + ApplicationDidHide: 1066, + ApplicationDidResignActive: 1067, + ApplicationDidUnhide: 1068, + ApplicationDidUpdate: 1069, + ApplicationShouldHandleReopen: 1070, + ApplicationWillBecomeActive: 1071, + ApplicationWillFinishLaunching: 1072, + ApplicationWillHide: 1073, + ApplicationWillResignActive: 1074, + ApplicationWillTerminate: 1075, + ApplicationWillUnhide: 1076, + ApplicationWillUpdate: 1077, + MenuDidAddItem: 1078, + MenuDidBeginTracking: 1079, + MenuDidClose: 1080, + MenuDidDisplayItem: 1081, + MenuDidEndTracking: 1082, + MenuDidHighlightItem: 1083, + MenuDidOpen: 1084, + MenuDidPopUp: 1085, + MenuDidRemoveItem: 1086, + MenuDidSendAction: 1087, + MenuDidSendActionToItem: 1088, + MenuDidUpdate: 1089, + MenuWillAddItem: 1090, + MenuWillBeginTracking: 1091, + MenuWillDisplayItem: 1092, + MenuWillEndTracking: 1093, + MenuWillHighlightItem: 1094, + MenuWillOpen: 1095, + MenuWillPopUp: 1096, + MenuWillRemoveItem: 1097, + MenuWillSendAction: 1098, + MenuWillSendActionToItem: 1099, + MenuWillUpdate: 1100, + WebViewDidCommitNavigation: 1101, + WebViewDidFinishNavigation: 1102, WebViewDidReceiveServerRedirectForProvisionalNavigation: 1103, - WebViewDidStartProvisionalNavigation: 1104, - WindowDidBecomeKey: 1105, - WindowDidBecomeMain: 1106, - WindowDidBeginSheet: 1107, - WindowDidChangeAlpha: 1108, - WindowDidChangeBackingLocation: 1109, - WindowDidChangeBackingProperties: 1110, - WindowDidChangeCollectionBehavior: 1111, - WindowDidChangeEffectiveAppearance: 1112, - WindowDidChangeOcclusionState: 1113, - WindowDidChangeOrderingMode: 1114, - WindowDidChangeScreen: 1115, - WindowDidChangeScreenParameters: 1116, - WindowDidChangeScreenProfile: 1117, - WindowDidChangeScreenSpace: 1118, - WindowDidChangeScreenSpaceProperties: 1119, - WindowDidChangeSharingType: 1120, - WindowDidChangeSpace: 1121, - WindowDidChangeSpaceOrderingMode: 1122, - WindowDidChangeTitle: 1123, - WindowDidChangeToolbar: 1124, - WindowDidDeminiaturize: 1125, - WindowDidEndSheet: 1126, - WindowDidEnterFullScreen: 1127, - WindowDidEnterVersionBrowser: 1128, - WindowDidExitFullScreen: 1129, - WindowDidExitVersionBrowser: 1130, - WindowDidExpose: 1131, - WindowDidFocus: 1132, - WindowDidMiniaturize: 1133, - WindowDidMove: 1134, - WindowDidOrderOffScreen: 1135, - WindowDidOrderOnScreen: 1136, - WindowDidResignKey: 1137, - WindowDidResignMain: 1138, - WindowDidResize: 1139, - WindowDidUpdate: 1140, - WindowDidUpdateAlpha: 1141, - WindowDidUpdateCollectionBehavior: 1142, - WindowDidUpdateCollectionProperties: 1143, - WindowDidUpdateShadow: 1144, - WindowDidUpdateTitle: 1145, - WindowDidUpdateToolbar: 1146, - WindowDidZoom: 1147, - WindowFileDraggingEntered: 1148, - WindowFileDraggingExited: 1149, - WindowFileDraggingPerformed: 1150, - WindowHide: 1151, - WindowMaximize: 1152, - WindowShouldClose: 1153, - WindowShow: 1154, - WindowUnMaximise: 1155, - WindowWillBecomeKey: 1156, - WindowWillBecomeMain: 1157, - WindowWillBeginSheet: 1158, - WindowWillChangeOrderingMode: 1159, - WindowWillClose: 1160, - WindowWillDeminiaturize: 1161, - WindowWillEnterFullScreen: 1162, - WindowWillEnterVersionBrowser: 1163, - WindowWillExitFullScreen: 1164, - WindowWillExitVersionBrowser: 1165, - WindowWillFocus: 1166, - WindowWillMiniaturize: 1167, - WindowWillMove: 1168, - WindowWillOrderOffScreen: 1169, - WindowWillOrderOnScreen: 1170, - WindowWillResignMain: 1171, - WindowWillResize: 1172, - WindowWillUnfocus: 1173, - WindowWillUpdate: 1174, - WindowWillUpdateAlpha: 1175, - WindowWillUpdateCollectionBehavior: 1176, - WindowWillUpdateCollectionProperties: 1177, - WindowWillUpdateShadow: 1178, - WindowWillUpdateTitle: 1179, - WindowWillUpdateToolbar: 1180, - WindowWillUpdateVisibility: 1181, - WindowWillUseStandardFrame: 1182, - WindowZoomIn: 1183, - WindowZoomOut: 1184, - WindowZoomReset: 1185, + WebViewDidStartProvisionalNavigation: 1104, + WindowDidBecomeKey: 1105, + WindowDidBecomeMain: 1106, + WindowDidBeginSheet: 1107, + WindowDidChangeAlpha: 1108, + WindowDidChangeBackingLocation: 1109, + WindowDidChangeBackingProperties: 1110, + WindowDidChangeCollectionBehavior: 1111, + WindowDidChangeEffectiveAppearance: 1112, + WindowDidChangeOcclusionState: 1113, + WindowDidChangeOrderingMode: 1114, + WindowDidChangeScreen: 1115, + WindowDidChangeScreenParameters: 1116, + WindowDidChangeScreenProfile: 1117, + WindowDidChangeScreenSpace: 1118, + WindowDidChangeScreenSpaceProperties: 1119, + WindowDidChangeSharingType: 1120, + WindowDidChangeSpace: 1121, + WindowDidChangeSpaceOrderingMode: 1122, + WindowDidChangeTitle: 1123, + WindowDidChangeToolbar: 1124, + WindowDidDeminiaturize: 1125, + WindowDidEndSheet: 1126, + WindowDidEnterFullScreen: 1127, + WindowDidEnterVersionBrowser: 1128, + WindowDidExitFullScreen: 1129, + WindowDidExitVersionBrowser: 1130, + WindowDidExpose: 1131, + WindowDidFocus: 1132, + WindowDidMiniaturize: 1133, + WindowDidMove: 1134, + WindowDidOrderOffScreen: 1135, + WindowDidOrderOnScreen: 1136, + WindowDidResignKey: 1137, + WindowDidResignMain: 1138, + WindowDidResize: 1139, + WindowDidUpdate: 1140, + WindowDidUpdateAlpha: 1141, + WindowDidUpdateCollectionBehavior: 1142, + WindowDidUpdateCollectionProperties: 1143, + WindowDidUpdateShadow: 1144, + WindowDidUpdateTitle: 1145, + WindowDidUpdateToolbar: 1146, + WindowDidZoom: 1147, + WindowFileDraggingEntered: 1148, + WindowFileDraggingExited: 1149, + WindowFileDraggingPerformed: 1150, + WindowHide: 1151, + WindowMaximise: 1152, + WindowUnMaximise: 1153, + WindowMinimise: 1154, + WindowUnMinimise: 1155, + WindowShouldClose: 1156, + WindowShow: 1157, + WindowWillBecomeKey: 1158, + WindowWillBecomeMain: 1159, + WindowWillBeginSheet: 1160, + WindowWillChangeOrderingMode: 1161, + WindowWillClose: 1162, + WindowWillDeminiaturize: 1163, + WindowWillEnterFullScreen: 1164, + WindowWillEnterVersionBrowser: 1165, + WindowWillExitFullScreen: 1166, + WindowWillExitVersionBrowser: 1167, + WindowWillFocus: 1168, + WindowWillMiniaturize: 1169, + WindowWillMove: 1170, + WindowWillOrderOffScreen: 1171, + WindowWillOrderOnScreen: 1172, + WindowWillResignMain: 1173, + WindowWillResize: 1174, + WindowWillUnfocus: 1175, + WindowWillUpdate: 1176, + WindowWillUpdateAlpha: 1177, + WindowWillUpdateCollectionBehavior: 1178, + WindowWillUpdateCollectionProperties: 1179, + WindowWillUpdateShadow: 1180, + WindowWillUpdateTitle: 1181, + WindowWillUpdateToolbar: 1182, + WindowWillUpdateVisibility: 1183, + WindowWillUseStandardFrame: 1184, + WindowZoomIn: 1185, + WindowZoomOut: 1186, + WindowZoomReset: 1187, } } var Windows = newWindowsEvents() type windowsEvents struct { - APMPowerSettingChange ApplicationEventType - APMPowerStatusChange ApplicationEventType - APMResumeAutomatic ApplicationEventType - APMResumeSuspend ApplicationEventType - APMSuspend ApplicationEventType - ApplicationStarted ApplicationEventType - SystemThemeChanged ApplicationEventType + APMPowerSettingChange ApplicationEventType + APMPowerStatusChange ApplicationEventType + APMResumeAutomatic ApplicationEventType + APMResumeSuspend ApplicationEventType + APMSuspend ApplicationEventType + ApplicationStarted ApplicationEventType + SystemThemeChanged ApplicationEventType WebViewNavigationCompleted WindowEventType - WindowActive WindowEventType - WindowBackgroundErase WindowEventType - WindowClickActive WindowEventType - WindowClosing WindowEventType - WindowDidMove WindowEventType - WindowDidResize WindowEventType - WindowDPIChanged WindowEventType - WindowDragDrop WindowEventType - WindowDragEnter WindowEventType - WindowDragLeave WindowEventType - WindowDragOver WindowEventType - WindowEndMove WindowEventType - WindowEndResize WindowEventType - WindowFullscreen WindowEventType - WindowHide WindowEventType - WindowInactive WindowEventType - WindowKeyDown WindowEventType - WindowKeyUp WindowEventType - WindowKillFocus WindowEventType - WindowMaximise WindowEventType - WindowMinimise WindowEventType - WindowNonClientHit WindowEventType - WindowNonClientMouseDown WindowEventType - WindowNonClientMouseLeave WindowEventType - WindowNonClientMouseMove WindowEventType - WindowNonClientMouseUp WindowEventType - WindowPaint WindowEventType - WindowRestore WindowEventType - WindowSetFocus WindowEventType - WindowShow WindowEventType - WindowStartMove WindowEventType - WindowStartResize WindowEventType - WindowUnFullscreen WindowEventType - WindowUnMaximise WindowEventType - WindowUnMinimise WindowEventType - WindowZOrderChanged WindowEventType + WindowActive WindowEventType + WindowBackgroundErase WindowEventType + WindowClickActive WindowEventType + WindowClosing WindowEventType + WindowDidMove WindowEventType + WindowDidResize WindowEventType + WindowDPIChanged WindowEventType + WindowDragDrop WindowEventType + WindowDragEnter WindowEventType + WindowDragLeave WindowEventType + WindowDragOver WindowEventType + WindowEndMove WindowEventType + WindowEndResize WindowEventType + WindowFullscreen WindowEventType + WindowHide WindowEventType + WindowInactive WindowEventType + WindowKeyDown WindowEventType + WindowKeyUp WindowEventType + WindowKillFocus WindowEventType + WindowNonClientHit WindowEventType + WindowNonClientMouseDown WindowEventType + WindowNonClientMouseLeave WindowEventType + WindowNonClientMouseMove WindowEventType + WindowNonClientMouseUp WindowEventType + WindowPaint WindowEventType + WindowRestore WindowEventType + WindowSetFocus WindowEventType + WindowShow WindowEventType + WindowStartMove WindowEventType + WindowStartResize WindowEventType + WindowUnFullscreen WindowEventType + WindowZOrderChanged WindowEventType + WindowMinimise WindowEventType + WindowUnMinimise WindowEventType + WindowMaximise WindowEventType + WindowUnMaximise WindowEventType } func newWindowsEvents() windowsEvents { return windowsEvents{ - APMPowerSettingChange: 1186, - APMPowerStatusChange: 1187, - APMResumeAutomatic: 1188, - APMResumeSuspend: 1189, - APMSuspend: 1190, - ApplicationStarted: 1191, - SystemThemeChanged: 1192, - WebViewNavigationCompleted: 1193, - WindowActive: 1194, - WindowBackgroundErase: 1195, - WindowClickActive: 1196, - WindowClosing: 1197, - WindowDidMove: 1198, - WindowDidResize: 1199, - WindowDPIChanged: 1200, - WindowDragDrop: 1201, - WindowDragEnter: 1202, - WindowDragLeave: 1203, - WindowDragOver: 1204, - WindowEndMove: 1205, - WindowEndResize: 1206, - WindowFullscreen: 1207, - WindowHide: 1208, - WindowInactive: 1209, - WindowKeyDown: 1210, - WindowKeyUp: 1211, - WindowKillFocus: 1212, - WindowMaximise: 1213, - WindowMinimise: 1214, - WindowNonClientHit: 1215, - WindowNonClientMouseDown: 1216, - WindowNonClientMouseLeave: 1217, - WindowNonClientMouseMove: 1218, - WindowNonClientMouseUp: 1219, - WindowPaint: 1220, - WindowRestore: 1221, - WindowSetFocus: 1222, - WindowShow: 1223, - WindowStartMove: 1224, - WindowStartResize: 1225, - WindowUnFullscreen: 1226, - WindowUnMaximise: 1227, - WindowUnMinimise: 1228, - WindowZOrderChanged: 1229, + APMPowerSettingChange: 1188, + APMPowerStatusChange: 1189, + APMResumeAutomatic: 1190, + APMResumeSuspend: 1191, + APMSuspend: 1192, + ApplicationStarted: 1193, + SystemThemeChanged: 1194, + WebViewNavigationCompleted: 1195, + WindowActive: 1196, + WindowBackgroundErase: 1197, + WindowClickActive: 1198, + WindowClosing: 1199, + WindowDidMove: 1200, + WindowDidResize: 1201, + WindowDPIChanged: 1202, + WindowDragDrop: 1203, + WindowDragEnter: 1204, + WindowDragLeave: 1205, + WindowDragOver: 1206, + WindowEndMove: 1207, + WindowEndResize: 1208, + WindowFullscreen: 1209, + WindowHide: 1210, + WindowInactive: 1211, + WindowKeyDown: 1212, + WindowKeyUp: 1213, + WindowKillFocus: 1214, + WindowNonClientHit: 1215, + WindowNonClientMouseDown: 1216, + WindowNonClientMouseLeave: 1217, + WindowNonClientMouseMove: 1218, + WindowNonClientMouseUp: 1219, + WindowPaint: 1220, + WindowRestore: 1221, + WindowSetFocus: 1222, + WindowShow: 1223, + WindowStartMove: 1224, + WindowStartResize: 1225, + WindowUnFullscreen: 1226, + WindowZOrderChanged: 1227, + WindowMinimise: 1228, + WindowUnMinimise: 1229, + WindowMaximise: 1230, + WindowUnMaximise: 1231, } } @@ -500,13 +504,13 @@ var eventToJS = map[uint]string{ 1061: "mac:ApplicationDidChangeScreenParameters", 1062: "mac:ApplicationDidChangeStatusBarFrame", 1063: "mac:ApplicationDidChangeStatusBarOrientation", - 1064: "mac:ApplicationDidChangeTheme!", + 1064: "mac:ApplicationDidChangeTheme", 1065: "mac:ApplicationDidFinishLaunching", 1066: "mac:ApplicationDidHide", - 1067: "mac:ApplicationDidResignActiveNotification", + 1067: "mac:ApplicationDidResignActive", 1068: "mac:ApplicationDidUnhide", 1069: "mac:ApplicationDidUpdate", - 1070: "mac:ApplicationShouldHandleReopen!", + 1070: "mac:ApplicationShouldHandleReopen", 1071: "mac:ApplicationWillBecomeActive", 1072: "mac:ApplicationWillFinishLaunching", 1073: "mac:ApplicationWillHide", @@ -583,74 +587,74 @@ var eventToJS = map[uint]string{ 1144: "mac:WindowDidUpdateShadow", 1145: "mac:WindowDidUpdateTitle", 1146: "mac:WindowDidUpdateToolbar", - 1147: "mac:WindowDidZoom!", + 1147: "mac:WindowDidZoom", 1148: "mac:WindowFileDraggingEntered", 1149: "mac:WindowFileDraggingExited", 1150: "mac:WindowFileDraggingPerformed", 1151: "mac:WindowHide", - 1152: "mac:WindowMaximize", - 1153: "mac:WindowShouldClose!", - 1154: "mac:WindowShow", - 1155: "mac:WindowUnMaximise", - 1156: "mac:WindowWillBecomeKey", - 1157: "mac:WindowWillBecomeMain", - 1158: "mac:WindowWillBeginSheet", - 1159: "mac:WindowWillChangeOrderingMode", - 1160: "mac:WindowWillClose", - 1161: "mac:WindowWillDeminiaturize", - 1162: "mac:WindowWillEnterFullScreen", - 1163: "mac:WindowWillEnterVersionBrowser", - 1164: "mac:WindowWillExitFullScreen", - 1165: "mac:WindowWillExitVersionBrowser", - 1166: "mac:WindowWillFocus", - 1167: "mac:WindowWillMiniaturize", - 1168: "mac:WindowWillMove", - 1169: "mac:WindowWillOrderOffScreen", - 1170: "mac:WindowWillOrderOnScreen", - 1171: "mac:WindowWillResignMain", - 1172: "mac:WindowWillResize", - 1173: "mac:WindowWillUnfocus", - 1174: "mac:WindowWillUpdate", - 1175: "mac:WindowWillUpdateAlpha", - 1176: "mac:WindowWillUpdateCollectionBehavior", - 1177: "mac:WindowWillUpdateCollectionProperties", - 1178: "mac:WindowWillUpdateShadow", - 1179: "mac:WindowWillUpdateTitle", - 1180: "mac:WindowWillUpdateToolbar", - 1181: "mac:WindowWillUpdateVisibility", - 1182: "mac:WindowWillUseStandardFrame", - 1183: "mac:WindowZoomIn!", - 1184: "mac:WindowZoomOut!", - 1185: "mac:WindowZoomReset!", - 1186: "windows:APMPowerSettingChange", - 1187: "windows:APMPowerStatusChange", - 1188: "windows:APMResumeAutomatic", - 1189: "windows:APMResumeSuspend", - 1190: "windows:APMSuspend", - 1191: "windows:ApplicationStarted", - 1192: "windows:SystemThemeChanged", - 1193: "windows:WebViewNavigationCompleted", - 1194: "windows:WindowActive", - 1195: "windows:WindowBackgroundErase", - 1196: "windows:WindowClickActive", - 1197: "windows:WindowClosing", - 1198: "windows:WindowDidMove", - 1199: "windows:WindowDidResize", - 1200: "windows:WindowDPIChanged", - 1201: "windows:WindowDragDrop", - 1202: "windows:WindowDragEnter", - 1203: "windows:WindowDragLeave", - 1204: "windows:WindowDragOver", - 1205: "windows:WindowEndMove", - 1206: "windows:WindowEndResize", - 1207: "windows:WindowFullscreen", - 1208: "windows:WindowHide", - 1209: "windows:WindowInactive", - 1210: "windows:WindowKeyDown", - 1211: "windows:WindowKeyUp", - 1212: "windows:WindowKillFocus", - 1213: "windows:WindowMaximise", - 1214: "windows:WindowMinimise", + 1152: "mac:WindowMaximise", + 1153: "mac:WindowUnMaximise", + 1154: "mac:WindowMinimise", + 1155: "mac:WindowUnMinimise", + 1156: "mac:WindowShouldClose", + 1157: "mac:WindowShow", + 1158: "mac:WindowWillBecomeKey", + 1159: "mac:WindowWillBecomeMain", + 1160: "mac:WindowWillBeginSheet", + 1161: "mac:WindowWillChangeOrderingMode", + 1162: "mac:WindowWillClose", + 1163: "mac:WindowWillDeminiaturize", + 1164: "mac:WindowWillEnterFullScreen", + 1165: "mac:WindowWillEnterVersionBrowser", + 1166: "mac:WindowWillExitFullScreen", + 1167: "mac:WindowWillExitVersionBrowser", + 1168: "mac:WindowWillFocus", + 1169: "mac:WindowWillMiniaturize", + 1170: "mac:WindowWillMove", + 1171: "mac:WindowWillOrderOffScreen", + 1172: "mac:WindowWillOrderOnScreen", + 1173: "mac:WindowWillResignMain", + 1174: "mac:WindowWillResize", + 1175: "mac:WindowWillUnfocus", + 1176: "mac:WindowWillUpdate", + 1177: "mac:WindowWillUpdateAlpha", + 1178: "mac:WindowWillUpdateCollectionBehavior", + 1179: "mac:WindowWillUpdateCollectionProperties", + 1180: "mac:WindowWillUpdateShadow", + 1181: "mac:WindowWillUpdateTitle", + 1182: "mac:WindowWillUpdateToolbar", + 1183: "mac:WindowWillUpdateVisibility", + 1184: "mac:WindowWillUseStandardFrame", + 1185: "mac:WindowZoomIn", + 1186: "mac:WindowZoomOut", + 1187: "mac:WindowZoomReset", + 1188: "windows:APMPowerSettingChange", + 1189: "windows:APMPowerStatusChange", + 1190: "windows:APMResumeAutomatic", + 1191: "windows:APMResumeSuspend", + 1192: "windows:APMSuspend", + 1193: "windows:ApplicationStarted", + 1194: "windows:SystemThemeChanged", + 1195: "windows:WebViewNavigationCompleted", + 1196: "windows:WindowActive", + 1197: "windows:WindowBackgroundErase", + 1198: "windows:WindowClickActive", + 1199: "windows:WindowClosing", + 1200: "windows:WindowDidMove", + 1201: "windows:WindowDidResize", + 1202: "windows:WindowDPIChanged", + 1203: "windows:WindowDragDrop", + 1204: "windows:WindowDragEnter", + 1205: "windows:WindowDragLeave", + 1206: "windows:WindowDragOver", + 1207: "windows:WindowEndMove", + 1208: "windows:WindowEndResize", + 1209: "windows:WindowFullscreen", + 1210: "windows:WindowHide", + 1211: "windows:WindowInactive", + 1212: "windows:WindowKeyDown", + 1213: "windows:WindowKeyUp", + 1214: "windows:WindowKillFocus", 1215: "windows:WindowNonClientHit", 1216: "windows:WindowNonClientMouseDown", 1217: "windows:WindowNonClientMouseLeave", @@ -663,8 +667,9 @@ var eventToJS = map[uint]string{ 1224: "windows:WindowStartMove", 1225: "windows:WindowStartResize", 1226: "windows:WindowUnFullscreen", - 1227: "windows:WindowUnMaximise", - 1228: "windows:WindowUnMinimise", - 1229: "windows:WindowZOrderChanged", + 1227: "windows:WindowZOrderChanged", + 1228: "windows:WindowMinimise", + 1229: "windows:WindowUnMinimise", + 1230: "windows:WindowMaximise", + 1231: "windows:WindowUnMaximise", } - diff --git a/v3/pkg/events/events.txt b/v3/pkg/events/events.txt index 169635213..1d43adf5e 100644 --- a/v3/pkg/events/events.txt +++ b/v3/pkg/events/events.txt @@ -41,7 +41,7 @@ mac:ApplicationDidChangeStatusBarOrientation mac:ApplicationDidChangeTheme! mac:ApplicationDidFinishLaunching mac:ApplicationDidHide -mac:ApplicationDidResignActiveNotification +mac:ApplicationDidResignActive mac:ApplicationDidUnhide mac:ApplicationDidUpdate mac:ApplicationShouldHandleReopen! @@ -126,10 +126,12 @@ mac:WindowFileDraggingEntered mac:WindowFileDraggingExited mac:WindowFileDraggingPerformed mac:WindowHide -mac:WindowMaximize +mac:WindowMaximise! +mac:WindowUnMaximise! +mac:WindowMinimise! +mac:WindowUnMinimise! mac:WindowShouldClose! mac:WindowShow -mac:WindowUnMaximise mac:WindowWillBecomeKey mac:WindowWillBecomeMain mac:WindowWillBeginSheet @@ -187,8 +189,6 @@ windows:WindowInactive windows:WindowKeyDown windows:WindowKeyUp windows:WindowKillFocus -windows:WindowMaximise -windows:WindowMinimise windows:WindowNonClientHit windows:WindowNonClientMouseDown windows:WindowNonClientMouseLeave @@ -201,6 +201,8 @@ windows:WindowShow windows:WindowStartMove windows:WindowStartResize windows:WindowUnFullscreen -windows:WindowUnMaximise -windows:WindowUnMinimise windows:WindowZOrderChanged +windows:WindowMinimise +windows:WindowUnMinimise +windows:WindowMaximise +windows:WindowUnMaximise \ No newline at end of file diff --git a/v3/pkg/events/events_darwin.h b/v3/pkg/events/events_darwin.h index cbd3d70c6..bacaab781 100644 --- a/v3/pkg/events/events_darwin.h +++ b/v3/pkg/events/events_darwin.h @@ -17,7 +17,7 @@ extern void processWindowEvent(unsigned int, unsigned int); #define EventApplicationDidChangeTheme 1064 #define EventApplicationDidFinishLaunching 1065 #define EventApplicationDidHide 1066 -#define EventApplicationDidResignActiveNotification 1067 +#define EventApplicationDidResignActive 1067 #define EventApplicationDidUnhide 1068 #define EventApplicationDidUpdate 1069 #define EventApplicationShouldHandleReopen 1070 @@ -102,42 +102,44 @@ extern void processWindowEvent(unsigned int, unsigned int); #define EventWindowFileDraggingExited 1149 #define EventWindowFileDraggingPerformed 1150 #define EventWindowHide 1151 -#define EventWindowMaximize 1152 -#define EventWindowShouldClose 1153 -#define EventWindowShow 1154 -#define EventWindowUnMaximise 1155 -#define EventWindowWillBecomeKey 1156 -#define EventWindowWillBecomeMain 1157 -#define EventWindowWillBeginSheet 1158 -#define EventWindowWillChangeOrderingMode 1159 -#define EventWindowWillClose 1160 -#define EventWindowWillDeminiaturize 1161 -#define EventWindowWillEnterFullScreen 1162 -#define EventWindowWillEnterVersionBrowser 1163 -#define EventWindowWillExitFullScreen 1164 -#define EventWindowWillExitVersionBrowser 1165 -#define EventWindowWillFocus 1166 -#define EventWindowWillMiniaturize 1167 -#define EventWindowWillMove 1168 -#define EventWindowWillOrderOffScreen 1169 -#define EventWindowWillOrderOnScreen 1170 -#define EventWindowWillResignMain 1171 -#define EventWindowWillResize 1172 -#define EventWindowWillUnfocus 1173 -#define EventWindowWillUpdate 1174 -#define EventWindowWillUpdateAlpha 1175 -#define EventWindowWillUpdateCollectionBehavior 1176 -#define EventWindowWillUpdateCollectionProperties 1177 -#define EventWindowWillUpdateShadow 1178 -#define EventWindowWillUpdateTitle 1179 -#define EventWindowWillUpdateToolbar 1180 -#define EventWindowWillUpdateVisibility 1181 -#define EventWindowWillUseStandardFrame 1182 -#define EventWindowZoomIn 1183 -#define EventWindowZoomOut 1184 -#define EventWindowZoomReset 1185 +#define EventWindowMaximise 1152 +#define EventWindowUnMaximise 1153 +#define EventWindowMinimise 1154 +#define EventWindowUnMinimise 1155 +#define EventWindowShouldClose 1156 +#define EventWindowShow 1157 +#define EventWindowWillBecomeKey 1158 +#define EventWindowWillBecomeMain 1159 +#define EventWindowWillBeginSheet 1160 +#define EventWindowWillChangeOrderingMode 1161 +#define EventWindowWillClose 1162 +#define EventWindowWillDeminiaturize 1163 +#define EventWindowWillEnterFullScreen 1164 +#define EventWindowWillEnterVersionBrowser 1165 +#define EventWindowWillExitFullScreen 1166 +#define EventWindowWillExitVersionBrowser 1167 +#define EventWindowWillFocus 1168 +#define EventWindowWillMiniaturize 1169 +#define EventWindowWillMove 1170 +#define EventWindowWillOrderOffScreen 1171 +#define EventWindowWillOrderOnScreen 1172 +#define EventWindowWillResignMain 1173 +#define EventWindowWillResize 1174 +#define EventWindowWillUnfocus 1175 +#define EventWindowWillUpdate 1176 +#define EventWindowWillUpdateAlpha 1177 +#define EventWindowWillUpdateCollectionBehavior 1178 +#define EventWindowWillUpdateCollectionProperties 1179 +#define EventWindowWillUpdateShadow 1180 +#define EventWindowWillUpdateTitle 1181 +#define EventWindowWillUpdateToolbar 1182 +#define EventWindowWillUpdateVisibility 1183 +#define EventWindowWillUseStandardFrame 1184 +#define EventWindowZoomIn 1185 +#define EventWindowZoomOut 1186 +#define EventWindowZoomReset 1187 -#define MAX_EVENTS 1186 +#define MAX_EVENTS 1188 #endif \ No newline at end of file diff --git a/v3/tasks/events/generate.go b/v3/tasks/events/generate.go index 5fa06f324..e643db182 100644 --- a/v3/tasks/events/generate.go +++ b/v3/tasks/events/generate.go @@ -172,9 +172,13 @@ func main() { event := strings.TrimSpace(string(split[1])) var ignoreEvent bool if strings.HasSuffix(event, "!") { - event = event[:len(event)-1] + event = strings.TrimSuffix(event, "!") ignoreEvent = true } + // Strip last byte of line if it's a "!" character + if line[len(line)-1] == '!' { + line = line[:len(line)-1] + } // Title case the event name eventTitle := string(bytes.ToUpper([]byte{event[0]})) + event[1:]