diff --git a/v3/internal/runtime/desktop/@wailsio/runtime/package.json b/v3/internal/runtime/desktop/@wailsio/runtime/package.json index de9d3f5a5..86782696c 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.29", + "version": "3.0.0-alpha.34", "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 9be464ca5..0d98a52d3 100644 --- a/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js +++ b/v3/internal/runtime/desktop/@wailsio/runtime/src/event_types.js @@ -28,6 +28,22 @@ export const EventTypes = { WindowDragOver: "windows:WindowDragOver", WindowDidMove: "windows:WindowDidMove", WindowDidResize: "windows:WindowDidResize", + WindowShow: "windows:WindowShow", + WindowHide: "windows:WindowHide", + WindowStartMove: "windows:WindowStartMove", + WindowEndMove: "windows:WindowEndMove", + WindowStartResize: "windows:WindowStartResize", + WindowEndResize: "windows:WindowEndResize", + WindowKeyDown: "windows:WindowKeyDown", + WindowKeyUp: "windows:WindowKeyUp", + WindowZOrderChanged: "windows:WindowZOrderChanged", + WindowPaint: "windows:WindowPaint", + WindowBackgroundErase: "windows:WindowBackgroundErase", + WindowNonClientHit: "windows:WindowNonClientHit", + WindowNonClientMouseDown: "windows:WindowNonClientMouseDown", + WindowNonClientMouseUp: "windows:WindowNonClientMouseUp", + WindowNonClientMouseMove: "windows:WindowNonClientMouseMove", + WindowNonClientMouseLeave: "windows:WindowNonClientMouseLeave", }, Mac: { ApplicationDidBecomeActive: "mac:ApplicationDidBecomeActive", @@ -72,10 +88,15 @@ export const EventTypes = { WindowDidChangeSpaceOrderingMode: "mac:WindowDidChangeSpaceOrderingMode", WindowDidChangeTitle: "mac:WindowDidChangeTitle", WindowDidChangeToolbar: "mac:WindowDidChangeToolbar", - WindowDidChangeVisibility: "mac:WindowDidChangeVisibility", WindowDidDeminiaturize: "mac:WindowDidDeminiaturize", WindowDidEndSheet: "mac:WindowDidEndSheet", WindowDidEnterFullScreen: "mac:WindowDidEnterFullScreen", + WindowMaximise: "mac:WindowMaximise", + WindowUnMaximise: "mac:WindowUnMaximise", + WindowDidZoom: "mac:WindowDidZoom!", + WindowZoomIn: "mac:WindowZoomIn!", + WindowZoomOut: "mac:WindowZoomOut!", + WindowZoomReset: "mac:WindowZoomReset!", WindowDidEnterVersionBrowser: "mac:WindowDidEnterVersionBrowser", WindowDidExitFullScreen: "mac:WindowDidExitFullScreen", WindowDidExitVersionBrowser: "mac:WindowDidExitVersionBrowser", @@ -95,7 +116,6 @@ export const EventTypes = { WindowDidUpdateShadow: "mac:WindowDidUpdateShadow", WindowDidUpdateTitle: "mac:WindowDidUpdateTitle", WindowDidUpdateToolbar: "mac:WindowDidUpdateToolbar", - WindowDidUpdateVisibility: "mac:WindowDidUpdateVisibility", WindowShouldClose: "mac:WindowShouldClose!", WindowWillBecomeKey: "mac:WindowWillBecomeKey", WindowWillBecomeMain: "mac:WindowWillBecomeMain", 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 3f2fa60e8..ebafefb67 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,6 +28,22 @@ export declare const EventTypes: { WindowDragOver: string, WindowDidMove: string, WindowDidResize: string, + WindowShow: string, + WindowHide: string, + WindowStartMove: string, + WindowEndMove: string, + WindowStartResize: string, + WindowEndResize: string, + WindowKeyDown: string, + WindowKeyUp: string, + WindowZOrderChanged: string, + WindowPaint: string, + WindowBackgroundErase: string, + WindowNonClientHit: string, + WindowNonClientMouseDown: string, + WindowNonClientMouseUp: string, + WindowNonClientMouseMove: string, + WindowNonClientMouseLeave: string, }, Mac: { ApplicationDidBecomeActive: string, @@ -72,10 +88,15 @@ export declare const EventTypes: { WindowDidChangeSpaceOrderingMode: string, WindowDidChangeTitle: string, WindowDidChangeToolbar: string, - WindowDidChangeVisibility: string, WindowDidDeminiaturize: string, WindowDidEndSheet: string, WindowDidEnterFullScreen: string, + WindowMaximise: string, + WindowUnMaximise: string, + WindowDidZoom: string, + WindowZoomIn: string, + WindowZoomOut: string, + WindowZoomReset: string, WindowDidEnterVersionBrowser: string, WindowDidExitFullScreen: string, WindowDidExitVersionBrowser: string, @@ -95,7 +116,6 @@ export declare const EventTypes: { WindowDidUpdateShadow: string, WindowDidUpdateTitle: string, WindowDidUpdateToolbar: string, - WindowDidUpdateVisibility: string, WindowShouldClose: string, WindowWillBecomeKey: string, WindowWillBecomeMain: string, diff --git a/v3/pkg/application/webview_window.go b/v3/pkg/application/webview_window.go index 247cb8ec1..2ea543579 100644 --- a/v3/pkg/application/webview_window.go +++ b/v3/pkg/application/webview_window.go @@ -418,10 +418,7 @@ func (w *WebviewWindow) Show() Window { InvokeSync(w.Run) return w } - InvokeSync(func() { - w.impl.show() - w.emit(events.Common.WindowShow) - }) + InvokeSync(w.impl.show) return w } @@ -429,10 +426,7 @@ func (w *WebviewWindow) Show() Window { func (w *WebviewWindow) Hide() Window { w.options.Hidden = true if w.impl != nil { - InvokeSync(func() { - w.impl.hide() - w.emit(events.Common.WindowHide) - }) + InvokeSync(w.impl.hide) } return w } @@ -975,10 +969,8 @@ func (w *WebviewWindow) OpenDevTools() { func (w *WebviewWindow) ZoomReset() Window { if w.impl != nil { InvokeSync(w.impl.zoomReset) - w.emit(events.Common.WindowZoomReset) } return w - } // ZoomIn increases the zoom level of the webview content @@ -986,10 +978,7 @@ func (w *WebviewWindow) ZoomIn() { if w.impl == nil && !w.isDestroyed() { return } - InvokeSync(func() { - w.impl.zoomIn() - w.emit(events.Common.WindowZoomIn) - }) + InvokeSync(w.impl.zoomIn) } // ZoomOut decreases the zoom level of the webview content @@ -997,31 +986,19 @@ func (w *WebviewWindow) ZoomOut() { if w.impl == nil && !w.isDestroyed() { return } - InvokeSync(func() { - w.impl.zoomOut() - w.emit(events.Common.WindowZoomOut) - }) + InvokeSync(w.impl.zoomOut) } // Close closes the window func (w *WebviewWindow) Close() { - if w.impl == nil && !w.isDestroyed() { - return - } - InvokeAsync(func() { - // w.impl.close() - Why wasn't this here? - w.emit(events.Common.WindowClosing) - }) + // NOOP? } func (w *WebviewWindow) Zoom() { if w.impl == nil && !w.isDestroyed() { return } - InvokeSync(func() { - w.impl.zoom() - w.emit(events.Common.WindowZoom) - }) + InvokeSync(w.impl.zoom) } // SetHTML sets the HTML of the window to the given html string. @@ -1042,10 +1019,7 @@ func (w *WebviewWindow) Minimise() Window { return w } if !w.IsMinimised() { - InvokeSync(func() { - w.impl.minimise() - w.emit(events.Common.WindowMinimise) - }) + InvokeSync(w.impl.minimise) } return w } @@ -1058,10 +1032,7 @@ func (w *WebviewWindow) Maximise() Window { } if !w.IsMaximised() { w.DisableSizeConstraints() - InvokeSync(func() { - w.impl.maximise() - w.emit(events.Common.WindowMaximise) - }) + InvokeSync(w.impl.maximise) } return w } @@ -1072,38 +1043,23 @@ func (w *WebviewWindow) UnMinimise() { return } if w.IsMinimised() { - InvokeSync(func() { - w.impl.unminimise() - w.emit(events.Common.WindowUnMinimise) - }) + InvokeSync(w.impl.unminimise) } } // UnMaximise un-maximises the window. Min/Max size constraints are re-enabled. func (w *WebviewWindow) UnMaximise() { - if w.impl == nil && !w.isDestroyed() { - return - } if w.IsMaximised() { w.EnableSizeConstraints() - InvokeSync(func() { - w.impl.unmaximise() - w.emit(events.Common.WindowUnMaximise) - }) + InvokeSync(w.impl.unmaximise) } } // UnFullscreen un-fullscreens the window. Min/Max size constraints are re-enabled. func (w *WebviewWindow) UnFullscreen() { - if w.impl == nil && !w.isDestroyed() { - return - } if w.IsFullscreen() { w.EnableSizeConstraints() - InvokeSync(func() { - w.impl.unfullscreen() - w.emit(events.Common.WindowUnFullscreen) - }) + InvokeSync(w.impl.unfullscreen) } } @@ -1120,7 +1076,6 @@ func (w *WebviewWindow) Restore() { } else if w.IsMaximised() { w.UnMaximise() } - w.emit(events.Common.WindowRestore) }) } @@ -1245,7 +1200,6 @@ func (w *WebviewWindow) NativeWindowHandle() (uintptr, error) { func (w *WebviewWindow) Focus() { InvokeSync(w.impl.focus) - w.emit(events.Common.WindowFocus) } func (w *WebviewWindow) emit(eventType events.WindowEventType) { diff --git a/v3/pkg/application/webview_window_darwin.m b/v3/pkg/application/webview_window_darwin.m index 6d2862ecd..256840660 100644 --- a/v3/pkg/application/webview_window_darwin.m +++ b/v3/pkg/application/webview_window_darwin.m @@ -193,6 +193,36 @@ extern bool hasListeners(unsigned int); } [super dealloc]; } +- (void)windowDidZoom:(NSNotification *)notification { + NSWindow *window = notification.object; + if ([window isZoomed]) { + if (hasListeners(EventWindowMaximise)) { + processWindowEvent(self.windowId, EventWindowMaximise); + } + } else { + if (hasListeners(EventWindowUnMaximise)) { + processWindowEvent(self.windowId, EventWindowUnMaximise); + } + } +} +- (void)performZoomIn:(id)sender { + [super zoom:sender]; + if (hasListeners(EventWindowZoomIn)) { + processWindowEvent(self.windowId, EventWindowZoomIn); + } +} +- (void)performZoomOut:(id)sender { + [super zoom:sender]; + if (hasListeners(EventWindowZoomOut)) { + processWindowEvent(self.windowId, EventWindowZoomOut); + } +} +- (void)performZoomReset:(id)sender { + [self setFrame:[self frameRectForContentRect:[[self screen] visibleFrame]] display:YES]; + if (hasListeners(EventWindowZoomReset)) { + processWindowEvent(self.windowId, EventWindowZoomReset); + } +} @end @implementation WebviewWindowDelegate - (BOOL)windowShouldClose:(NSWindow *)sender { @@ -248,6 +278,13 @@ extern bool hasListeners(unsigned int); return proposedOptions | NSApplicationPresentationAutoHideToolbar; } } +- (void)windowDidChangeVisibility:(NSNotification *)notification { + NSWindow *window = notification.object; + BOOL isVisible = ![window isVisible]; + if (hasListeners(isVisible ? EventWindowShow : EventWindowHide)) { + processWindowEvent(self.windowId, isVisible ? EventWindowShow : EventWindowHide); + } +} // GENERATED EVENTS START - (void)windowDidBecomeKey:(NSNotification *)notification { if( hasListeners(EventWindowDidBecomeKey) ) { @@ -369,12 +406,6 @@ extern bool hasListeners(unsigned int); } } -- (void)windowDidChangeVisibility:(NSNotification *)notification { - if( hasListeners(EventWindowDidChangeVisibility) ) { - processWindowEvent(self.windowId, EventWindowDidChangeVisibility); - } -} - - (void)windowDidDeminiaturize:(NSNotification *)notification { if( hasListeners(EventWindowDidDeminiaturize) ) { processWindowEvent(self.windowId, EventWindowDidDeminiaturize); @@ -393,6 +424,18 @@ extern bool hasListeners(unsigned int); } } +- (void)windowMaximise:(NSNotification *)notification { + if( hasListeners(EventWindowMaximise) ) { + processWindowEvent(self.windowId, EventWindowMaximise); + } +} + +- (void)windowUnMaximise:(NSNotification *)notification { + if( hasListeners(EventWindowUnMaximise) ) { + processWindowEvent(self.windowId, EventWindowUnMaximise); + } +} + - (void)windowDidEnterVersionBrowser:(NSNotification *)notification { if( hasListeners(EventWindowDidEnterVersionBrowser) ) { processWindowEvent(self.windowId, EventWindowDidEnterVersionBrowser); @@ -507,12 +550,6 @@ extern bool hasListeners(unsigned int); } } -- (void)windowDidUpdateVisibility:(NSNotification *)notification { - if( hasListeners(EventWindowDidUpdateVisibility) ) { - processWindowEvent(self.windowId, EventWindowDidUpdateVisibility); - } -} - - (void)windowWillBecomeKey:(NSNotification *)notification { if( hasListeners(EventWindowWillBecomeKey) ) { processWindowEvent(self.windowId, EventWindowWillBecomeKey); @@ -719,7 +756,6 @@ extern bool hasListeners(unsigned int); // GENERATED EVENTS END @end - void windowSetScreen(void* window, void* screen, int yOffset) { WebviewWindow* nsWindow = (WebviewWindow*)window; NSScreen* nsScreen = (NSScreen*)screen; diff --git a/v3/pkg/application/webview_window_windows.go b/v3/pkg/application/webview_window_windows.go index eeba9c27c..e57c4ecab 100644 --- a/v3/pkg/application/webview_window_windows.go +++ b/v3/pkg/application/webview_window_windows.go @@ -1043,6 +1043,19 @@ func (w *windowsWebviewWindow) WndProc(msg uint32, wparam, lparam uintptr) uintp case w32.WM_ENTERSIZEMOVE: // This is needed to close open dropdowns when moving the window https://github.com/MicrosoftEdge/WebView2Feedback/issues/2290 w32.SetFocus(w.hwnd) + if int(w32.GetKeyState(w32.VK_LBUTTON))&(0x8000) != 0 { + // Left mouse button is down - window is being moved + w.parent.emit(events.Windows.WindowStartMove) + } else { + // Window is being resized + w.parent.emit(events.Windows.WindowStartResize) + } + case w32.WM_EXITSIZEMOVE: + if int(w32.GetKeyState(w32.VK_LBUTTON))&0x8000 != 0 { + w.parent.emit(events.Windows.WindowEndMove) + } else { + w.parent.emit(events.Windows.WindowEndResize) + } case w32.WM_SETFOCUS: w.focus() w.parent.emit(events.Windows.WindowSetFocus) @@ -1054,9 +1067,28 @@ func (w *windowsWebviewWindow) WndProc(msg uint32, wparam, lparam uintptr) uintp w.moveDebouncer(func() { w.parent.emit(events.Windows.WindowDidMove) }) + case w32.WM_SHOWWINDOW: + if wparam == 1 { + w.parent.emit(events.Windows.WindowShow) + } else { + w.parent.emit(events.Windows.WindowHide) + } + case w32.WM_WINDOWPOSCHANGED: + windowPos := (*w32.WINDOWPOS)(unsafe.Pointer(lparam)) + if windowPos.Flags&w32.SWP_NOZORDER == 0 { + w.parent.emit(events.Windows.WindowZOrderChanged) + } + case w32.WM_PAINT: + w.parent.emit(events.Windows.WindowPaint) + case w32.WM_ERASEBKGND: + w.parent.emit(events.Windows.WindowBackgroundErase) + return 1 // Let WebView2 handle background erasing // Check for keypress case w32.WM_KEYDOWN: w.processKeyBinding(uint(wparam)) + w.parent.emit(events.Windows.WindowKeyDown) + case w32.WM_KEYUP: + w.parent.emit(events.Windows.WindowKeyUp) case w32.WM_SIZE: switch wparam { case w32.SIZE_MAXIMIZED: @@ -1144,7 +1176,16 @@ func (w *windowsWebviewWindow) WndProc(msg uint32, wparam, lparam uintptr) uintp if w.parent.options.Windows.WindowMaskDraggable { return w32.HTCAPTION } + w.parent.emit(events.Windows.WindowNonClientHit) return w32.HTCLIENT + case w32.WM_NCLBUTTONDOWN: + w.parent.emit(events.Windows.WindowNonClientMouseDown) + case w32.WM_NCLBUTTONUP: + w.parent.emit(events.Windows.WindowNonClientMouseUp) + case w32.WM_NCMOUSEMOVE: + w.parent.emit(events.Windows.WindowNonClientMouseMove) + case w32.WM_NCMOUSELEAVE: + w.parent.emit(events.Windows.WindowNonClientMouseLeave) } } diff --git a/v3/pkg/events/defaults.go b/v3/pkg/events/defaults.go index 3b169ba8f..24bc118de 100644 --- a/v3/pkg/events/defaults.go +++ b/v3/pkg/events/defaults.go @@ -15,17 +15,38 @@ var defaultWindowEventMapping = map[string]map[WindowEventType]WindowEventType{ Windows.WindowUnMinimise: Common.WindowUnMinimise, Windows.WindowFullscreen: Common.WindowFullscreen, Windows.WindowUnFullscreen: Common.WindowUnFullscreen, + Windows.WindowShow: Common.WindowShow, + Windows.WindowHide: Common.WindowHide, + Windows.WindowDidMove: Common.WindowDidMove, + Windows.WindowDidResize: Common.WindowDidResize, + Windows.WindowSetFocus: Common.WindowFocus, + Windows.WindowKillFocus: Common.WindowLostFocus, }, "darwin": { - Mac.WindowDidResignKey: Common.WindowLostFocus, Mac.WindowDidResignKey: Common.WindowLostFocus, Mac.WindowDidBecomeKey: Common.WindowFocus, Mac.WindowDidMiniaturize: Common.WindowMinimise, Mac.WindowDidDeminiaturize: Common.WindowUnMinimise, Mac.WindowDidEnterFullScreen: Common.WindowFullscreen, Mac.WindowDidExitFullScreen: Common.WindowUnFullscreen, + Mac.WindowMaximise: Common.WindowMaximise, + Mac.WindowUnMaximise: Common.WindowUnMaximise, + Mac.WindowDidMove: Common.WindowDidMove, + Mac.WindowDidResize: Common.WindowDidResize, + Mac.WindowDidUpdate: Common.WindowShow, + Mac.WindowDidZoom: Common.WindowMaximise, + Mac.WindowZoomIn: Common.WindowZoomIn, + Mac.WindowZoomOut: Common.WindowZoomOut, + Mac.WindowZoomReset: Common.WindowZoomReset, + }, + "linux": { + Linux.WindowDeleteEvent: Common.WindowClosing, + Linux.WindowFocusIn: Common.WindowFocus, + Linux.WindowFocusOut: Common.WindowLostFocus, + Linux.WindowDidMove: Common.WindowDidMove, + Linux.WindowDidResize: Common.WindowDidResize, + Linux.WindowLoadChanged: Common.WindowShow, }, - "linux": {}, } func DefaultWindowEventMapping() map[WindowEventType]WindowEventType { diff --git a/v3/pkg/events/events.go b/v3/pkg/events/events.go index 3191aa975..17a7cf43e 100644 --- a/v3/pkg/events/events.go +++ b/v3/pkg/events/events.go @@ -34,30 +34,30 @@ type commonEvents struct { func newCommonEvents() commonEvents { return commonEvents{ - ApplicationStarted: 1183, - WindowMaximise: 1184, - WindowUnMaximise: 1185, - WindowFullscreen: 1186, - WindowUnFullscreen: 1187, - WindowRestore: 1188, - WindowMinimise: 1189, - WindowUnMinimise: 1190, - WindowClosing: 1191, - WindowZoom: 1192, - WindowZoomIn: 1193, - WindowZoomOut: 1194, - WindowZoomReset: 1195, - WindowFocus: 1196, - WindowLostFocus: 1197, - WindowShow: 1198, - WindowHide: 1199, - WindowDPIChanged: 1200, - WindowFilesDropped: 1201, - WindowRuntimeReady: 1202, - ThemeChanged: 1203, - WindowDidMove: 1204, - WindowDidResize: 1205, - ApplicationOpenedWithFile: 1206, + ApplicationStarted: 1203, + WindowMaximise: 1204, + WindowUnMaximise: 1205, + WindowFullscreen: 1206, + WindowUnFullscreen: 1207, + WindowRestore: 1208, + WindowMinimise: 1209, + WindowUnMinimise: 1210, + WindowClosing: 1211, + WindowZoom: 1212, + WindowZoomIn: 1213, + WindowZoomOut: 1214, + WindowZoomReset: 1215, + WindowFocus: 1216, + WindowLostFocus: 1217, + WindowShow: 1218, + WindowHide: 1219, + WindowDPIChanged: 1220, + WindowFilesDropped: 1221, + WindowRuntimeReady: 1222, + ThemeChanged: 1223, + WindowDidMove: 1224, + WindowDidResize: 1225, + ApplicationOpenedWithFile: 1226, } } @@ -132,10 +132,15 @@ type macEvents struct { WindowDidChangeSpaceOrderingMode WindowEventType WindowDidChangeTitle WindowEventType WindowDidChangeToolbar WindowEventType - WindowDidChangeVisibility WindowEventType WindowDidDeminiaturize WindowEventType WindowDidEndSheet WindowEventType WindowDidEnterFullScreen WindowEventType + WindowMaximise WindowEventType + WindowUnMaximise WindowEventType + WindowDidZoom WindowEventType + WindowZoomIn WindowEventType + WindowZoomOut WindowEventType + WindowZoomReset WindowEventType WindowDidEnterVersionBrowser WindowEventType WindowDidExitFullScreen WindowEventType WindowDidExitVersionBrowser WindowEventType @@ -155,7 +160,6 @@ type macEvents struct { WindowDidUpdateShadow WindowEventType WindowDidUpdateTitle WindowEventType WindowDidUpdateToolbar WindowEventType - WindowDidUpdateVisibility WindowEventType WindowShouldClose WindowEventType WindowWillBecomeKey WindowEventType WindowWillBecomeMain WindowEventType @@ -260,88 +264,92 @@ func newMacEvents() macEvents { WindowDidChangeSpaceOrderingMode: 1071, WindowDidChangeTitle: 1072, WindowDidChangeToolbar: 1073, - WindowDidChangeVisibility: 1074, - WindowDidDeminiaturize: 1075, - WindowDidEndSheet: 1076, - WindowDidEnterFullScreen: 1077, - WindowDidEnterVersionBrowser: 1078, - WindowDidExitFullScreen: 1079, - WindowDidExitVersionBrowser: 1080, - WindowDidExpose: 1081, - WindowDidFocus: 1082, - WindowDidMiniaturize: 1083, - WindowDidMove: 1084, - WindowDidOrderOffScreen: 1085, - WindowDidOrderOnScreen: 1086, - WindowDidResignKey: 1087, - WindowDidResignMain: 1088, - WindowDidResize: 1089, - WindowDidUpdate: 1090, - WindowDidUpdateAlpha: 1091, - WindowDidUpdateCollectionBehavior: 1092, - WindowDidUpdateCollectionProperties: 1093, - WindowDidUpdateShadow: 1094, - WindowDidUpdateTitle: 1095, - WindowDidUpdateToolbar: 1096, - WindowDidUpdateVisibility: 1097, - WindowShouldClose: 1098, - WindowWillBecomeKey: 1099, - WindowWillBecomeMain: 1100, - WindowWillBeginSheet: 1101, - WindowWillChangeOrderingMode: 1102, - WindowWillClose: 1103, - WindowWillDeminiaturize: 1104, - WindowWillEnterFullScreen: 1105, - WindowWillEnterVersionBrowser: 1106, - WindowWillExitFullScreen: 1107, - WindowWillExitVersionBrowser: 1108, - WindowWillFocus: 1109, - WindowWillMiniaturize: 1110, - WindowWillMove: 1111, - WindowWillOrderOffScreen: 1112, - WindowWillOrderOnScreen: 1113, - WindowWillResignMain: 1114, - WindowWillResize: 1115, - WindowWillUnfocus: 1116, - WindowWillUpdate: 1117, - WindowWillUpdateAlpha: 1118, - WindowWillUpdateCollectionBehavior: 1119, - WindowWillUpdateCollectionProperties: 1120, - WindowWillUpdateShadow: 1121, - WindowWillUpdateTitle: 1122, - WindowWillUpdateToolbar: 1123, - WindowWillUpdateVisibility: 1124, - WindowWillUseStandardFrame: 1125, - MenuWillOpen: 1126, - MenuDidOpen: 1127, - MenuDidClose: 1128, - MenuWillSendAction: 1129, - MenuDidSendAction: 1130, - MenuWillHighlightItem: 1131, - MenuDidHighlightItem: 1132, - MenuWillDisplayItem: 1133, - MenuDidDisplayItem: 1134, - MenuWillAddItem: 1135, - MenuDidAddItem: 1136, - MenuWillRemoveItem: 1137, - MenuDidRemoveItem: 1138, - MenuWillBeginTracking: 1139, - MenuDidBeginTracking: 1140, - MenuWillEndTracking: 1141, - MenuDidEndTracking: 1142, - MenuWillUpdate: 1143, - MenuDidUpdate: 1144, - MenuWillPopUp: 1145, - MenuDidPopUp: 1146, - MenuWillSendActionToItem: 1147, - MenuDidSendActionToItem: 1148, - WebViewDidStartProvisionalNavigation: 1149, - WebViewDidReceiveServerRedirectForProvisionalNavigation: 1150, - WebViewDidFinishNavigation: 1151, - WebViewDidCommitNavigation: 1152, - WindowFileDraggingEntered: 1153, - WindowFileDraggingPerformed: 1154, - WindowFileDraggingExited: 1155, + WindowDidDeminiaturize: 1074, + WindowDidEndSheet: 1075, + WindowDidEnterFullScreen: 1076, + WindowMaximise: 1077, + WindowUnMaximise: 1078, + WindowDidZoom: 1079, + WindowZoomIn: 1080, + WindowZoomOut: 1081, + WindowZoomReset: 1082, + WindowDidEnterVersionBrowser: 1083, + WindowDidExitFullScreen: 1084, + WindowDidExitVersionBrowser: 1085, + WindowDidExpose: 1086, + WindowDidFocus: 1087, + WindowDidMiniaturize: 1088, + WindowDidMove: 1089, + WindowDidOrderOffScreen: 1090, + WindowDidOrderOnScreen: 1091, + WindowDidResignKey: 1092, + WindowDidResignMain: 1093, + WindowDidResize: 1094, + WindowDidUpdate: 1095, + WindowDidUpdateAlpha: 1096, + WindowDidUpdateCollectionBehavior: 1097, + WindowDidUpdateCollectionProperties: 1098, + WindowDidUpdateShadow: 1099, + WindowDidUpdateTitle: 1100, + WindowDidUpdateToolbar: 1101, + WindowShouldClose: 1102, + WindowWillBecomeKey: 1103, + WindowWillBecomeMain: 1104, + WindowWillBeginSheet: 1105, + WindowWillChangeOrderingMode: 1106, + WindowWillClose: 1107, + WindowWillDeminiaturize: 1108, + WindowWillEnterFullScreen: 1109, + WindowWillEnterVersionBrowser: 1110, + WindowWillExitFullScreen: 1111, + WindowWillExitVersionBrowser: 1112, + WindowWillFocus: 1113, + WindowWillMiniaturize: 1114, + WindowWillMove: 1115, + WindowWillOrderOffScreen: 1116, + WindowWillOrderOnScreen: 1117, + WindowWillResignMain: 1118, + WindowWillResize: 1119, + WindowWillUnfocus: 1120, + WindowWillUpdate: 1121, + WindowWillUpdateAlpha: 1122, + WindowWillUpdateCollectionBehavior: 1123, + WindowWillUpdateCollectionProperties: 1124, + WindowWillUpdateShadow: 1125, + WindowWillUpdateTitle: 1126, + WindowWillUpdateToolbar: 1127, + WindowWillUpdateVisibility: 1128, + WindowWillUseStandardFrame: 1129, + MenuWillOpen: 1130, + MenuDidOpen: 1131, + MenuDidClose: 1132, + MenuWillSendAction: 1133, + MenuDidSendAction: 1134, + MenuWillHighlightItem: 1135, + MenuDidHighlightItem: 1136, + MenuWillDisplayItem: 1137, + MenuDidDisplayItem: 1138, + MenuWillAddItem: 1139, + MenuDidAddItem: 1140, + MenuWillRemoveItem: 1141, + MenuDidRemoveItem: 1142, + MenuWillBeginTracking: 1143, + MenuDidBeginTracking: 1144, + MenuWillEndTracking: 1145, + MenuDidEndTracking: 1146, + MenuWillUpdate: 1147, + MenuDidUpdate: 1148, + MenuWillPopUp: 1149, + MenuDidPopUp: 1150, + MenuWillSendActionToItem: 1151, + MenuDidSendActionToItem: 1152, + WebViewDidStartProvisionalNavigation: 1153, + WebViewDidReceiveServerRedirectForProvisionalNavigation: 1154, + WebViewDidFinishNavigation: 1155, + WebViewDidCommitNavigation: 1156, + WindowFileDraggingEntered: 1157, + WindowFileDraggingPerformed: 1158, + WindowFileDraggingExited: 1159, } } @@ -375,37 +383,69 @@ type windowsEvents struct { WindowDragOver WindowEventType WindowDidMove WindowEventType WindowDidResize WindowEventType + WindowShow WindowEventType + WindowHide WindowEventType + WindowStartMove WindowEventType + WindowEndMove WindowEventType + WindowStartResize WindowEventType + WindowEndResize WindowEventType + WindowKeyDown WindowEventType + WindowKeyUp WindowEventType + WindowZOrderChanged WindowEventType + WindowPaint WindowEventType + WindowBackgroundErase WindowEventType + WindowNonClientHit WindowEventType + WindowNonClientMouseDown WindowEventType + WindowNonClientMouseUp WindowEventType + WindowNonClientMouseMove WindowEventType + WindowNonClientMouseLeave WindowEventType } func newWindowsEvents() windowsEvents { return windowsEvents{ - SystemThemeChanged: 1156, - APMPowerStatusChange: 1157, - APMSuspend: 1158, - APMResumeAutomatic: 1159, - APMResumeSuspend: 1160, - APMPowerSettingChange: 1161, - ApplicationStarted: 1162, - WebViewNavigationCompleted: 1163, - WindowInactive: 1164, - WindowActive: 1165, - WindowClickActive: 1166, - WindowMaximise: 1167, - WindowUnMaximise: 1168, - WindowFullscreen: 1169, - WindowUnFullscreen: 1170, - WindowRestore: 1171, - WindowMinimise: 1172, - WindowUnMinimise: 1173, - WindowClose: 1174, - WindowSetFocus: 1175, - WindowKillFocus: 1176, - WindowDragDrop: 1177, - WindowDragEnter: 1178, - WindowDragLeave: 1179, - WindowDragOver: 1180, - WindowDidMove: 1181, - WindowDidResize: 1182, + SystemThemeChanged: 1160, + APMPowerStatusChange: 1161, + APMSuspend: 1162, + APMResumeAutomatic: 1163, + APMResumeSuspend: 1164, + APMPowerSettingChange: 1165, + ApplicationStarted: 1166, + WebViewNavigationCompleted: 1167, + WindowInactive: 1168, + WindowActive: 1169, + WindowClickActive: 1170, + WindowMaximise: 1171, + WindowUnMaximise: 1172, + WindowFullscreen: 1173, + WindowUnFullscreen: 1174, + WindowRestore: 1175, + WindowMinimise: 1176, + WindowUnMinimise: 1177, + WindowClose: 1178, + WindowSetFocus: 1179, + WindowKillFocus: 1180, + WindowDragDrop: 1181, + WindowDragEnter: 1182, + WindowDragLeave: 1183, + WindowDragOver: 1184, + WindowDidMove: 1185, + WindowDidResize: 1186, + WindowShow: 1187, + WindowHide: 1188, + WindowStartMove: 1189, + WindowEndMove: 1190, + WindowStartResize: 1191, + WindowEndResize: 1192, + WindowKeyDown: 1193, + WindowKeyUp: 1194, + WindowZOrderChanged: 1195, + WindowPaint: 1196, + WindowBackgroundErase: 1197, + WindowNonClientHit: 1198, + WindowNonClientMouseDown: 1199, + WindowNonClientMouseUp: 1200, + WindowNonClientMouseMove: 1201, + WindowNonClientMouseLeave: 1202, } } @@ -464,137 +504,157 @@ var eventToJS = map[uint]string{ 1071: "mac:WindowDidChangeSpaceOrderingMode", 1072: "mac:WindowDidChangeTitle", 1073: "mac:WindowDidChangeToolbar", - 1074: "mac:WindowDidChangeVisibility", - 1075: "mac:WindowDidDeminiaturize", - 1076: "mac:WindowDidEndSheet", - 1077: "mac:WindowDidEnterFullScreen", - 1078: "mac:WindowDidEnterVersionBrowser", - 1079: "mac:WindowDidExitFullScreen", - 1080: "mac:WindowDidExitVersionBrowser", - 1081: "mac:WindowDidExpose", - 1082: "mac:WindowDidFocus", - 1083: "mac:WindowDidMiniaturize", - 1084: "mac:WindowDidMove", - 1085: "mac:WindowDidOrderOffScreen", - 1086: "mac:WindowDidOrderOnScreen", - 1087: "mac:WindowDidResignKey", - 1088: "mac:WindowDidResignMain", - 1089: "mac:WindowDidResize", - 1090: "mac:WindowDidUpdate", - 1091: "mac:WindowDidUpdateAlpha", - 1092: "mac:WindowDidUpdateCollectionBehavior", - 1093: "mac:WindowDidUpdateCollectionProperties", - 1094: "mac:WindowDidUpdateShadow", - 1095: "mac:WindowDidUpdateTitle", - 1096: "mac:WindowDidUpdateToolbar", - 1097: "mac:WindowDidUpdateVisibility", - 1098: "mac:WindowShouldClose!", - 1099: "mac:WindowWillBecomeKey", - 1100: "mac:WindowWillBecomeMain", - 1101: "mac:WindowWillBeginSheet", - 1102: "mac:WindowWillChangeOrderingMode", - 1103: "mac:WindowWillClose", - 1104: "mac:WindowWillDeminiaturize", - 1105: "mac:WindowWillEnterFullScreen", - 1106: "mac:WindowWillEnterVersionBrowser", - 1107: "mac:WindowWillExitFullScreen", - 1108: "mac:WindowWillExitVersionBrowser", - 1109: "mac:WindowWillFocus", - 1110: "mac:WindowWillMiniaturize", - 1111: "mac:WindowWillMove", - 1112: "mac:WindowWillOrderOffScreen", - 1113: "mac:WindowWillOrderOnScreen", - 1114: "mac:WindowWillResignMain", - 1115: "mac:WindowWillResize", - 1116: "mac:WindowWillUnfocus", - 1117: "mac:WindowWillUpdate", - 1118: "mac:WindowWillUpdateAlpha", - 1119: "mac:WindowWillUpdateCollectionBehavior", - 1120: "mac:WindowWillUpdateCollectionProperties", - 1121: "mac:WindowWillUpdateShadow", - 1122: "mac:WindowWillUpdateTitle", - 1123: "mac:WindowWillUpdateToolbar", - 1124: "mac:WindowWillUpdateVisibility", - 1125: "mac:WindowWillUseStandardFrame", - 1126: "mac:MenuWillOpen", - 1127: "mac:MenuDidOpen", - 1128: "mac:MenuDidClose", - 1129: "mac:MenuWillSendAction", - 1130: "mac:MenuDidSendAction", - 1131: "mac:MenuWillHighlightItem", - 1132: "mac:MenuDidHighlightItem", - 1133: "mac:MenuWillDisplayItem", - 1134: "mac:MenuDidDisplayItem", - 1135: "mac:MenuWillAddItem", - 1136: "mac:MenuDidAddItem", - 1137: "mac:MenuWillRemoveItem", - 1138: "mac:MenuDidRemoveItem", - 1139: "mac:MenuWillBeginTracking", - 1140: "mac:MenuDidBeginTracking", - 1141: "mac:MenuWillEndTracking", - 1142: "mac:MenuDidEndTracking", - 1143: "mac:MenuWillUpdate", - 1144: "mac:MenuDidUpdate", - 1145: "mac:MenuWillPopUp", - 1146: "mac:MenuDidPopUp", - 1147: "mac:MenuWillSendActionToItem", - 1148: "mac:MenuDidSendActionToItem", - 1149: "mac:WebViewDidStartProvisionalNavigation", - 1150: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation", - 1151: "mac:WebViewDidFinishNavigation", - 1152: "mac:WebViewDidCommitNavigation", - 1153: "mac:WindowFileDraggingEntered", - 1154: "mac:WindowFileDraggingPerformed", - 1155: "mac:WindowFileDraggingExited", - 1156: "windows:SystemThemeChanged", - 1157: "windows:APMPowerStatusChange", - 1158: "windows:APMSuspend", - 1159: "windows:APMResumeAutomatic", - 1160: "windows:APMResumeSuspend", - 1161: "windows:APMPowerSettingChange", - 1162: "windows:ApplicationStarted", - 1163: "windows:WebViewNavigationCompleted", - 1164: "windows:WindowInactive", - 1165: "windows:WindowActive", - 1166: "windows:WindowClickActive", - 1167: "windows:WindowMaximise", - 1168: "windows:WindowUnMaximise", - 1169: "windows:WindowFullscreen", - 1170: "windows:WindowUnFullscreen", - 1171: "windows:WindowRestore", - 1172: "windows:WindowMinimise", - 1173: "windows:WindowUnMinimise", - 1174: "windows:WindowClose", - 1175: "windows:WindowSetFocus", - 1176: "windows:WindowKillFocus", - 1177: "windows:WindowDragDrop", - 1178: "windows:WindowDragEnter", - 1179: "windows:WindowDragLeave", - 1180: "windows:WindowDragOver", - 1181: "windows:WindowDidMove", - 1182: "windows:WindowDidResize", - 1183: "common:ApplicationStarted", - 1184: "common:WindowMaximise", - 1185: "common:WindowUnMaximise", - 1186: "common:WindowFullscreen", - 1187: "common:WindowUnFullscreen", - 1188: "common:WindowRestore", - 1189: "common:WindowMinimise", - 1190: "common:WindowUnMinimise", - 1191: "common:WindowClosing", - 1192: "common:WindowZoom", - 1193: "common:WindowZoomIn", - 1194: "common:WindowZoomOut", - 1195: "common:WindowZoomReset", - 1196: "common:WindowFocus", - 1197: "common:WindowLostFocus", - 1198: "common:WindowShow", - 1199: "common:WindowHide", - 1200: "common:WindowDPIChanged", - 1201: "common:WindowFilesDropped", - 1202: "common:WindowRuntimeReady", - 1203: "common:ThemeChanged", - 1204: "common:WindowDidMove", - 1205: "common:WindowDidResize", - 1206: "common:ApplicationOpenedWithFile", + 1074: "mac:WindowDidDeminiaturize", + 1075: "mac:WindowDidEndSheet", + 1076: "mac:WindowDidEnterFullScreen", + 1077: "mac:WindowMaximise", + 1078: "mac:WindowUnMaximise", + 1079: "mac:WindowDidZoom!", + 1080: "mac:WindowZoomIn!", + 1081: "mac:WindowZoomOut!", + 1082: "mac:WindowZoomReset!", + 1083: "mac:WindowDidEnterVersionBrowser", + 1084: "mac:WindowDidExitFullScreen", + 1085: "mac:WindowDidExitVersionBrowser", + 1086: "mac:WindowDidExpose", + 1087: "mac:WindowDidFocus", + 1088: "mac:WindowDidMiniaturize", + 1089: "mac:WindowDidMove", + 1090: "mac:WindowDidOrderOffScreen", + 1091: "mac:WindowDidOrderOnScreen", + 1092: "mac:WindowDidResignKey", + 1093: "mac:WindowDidResignMain", + 1094: "mac:WindowDidResize", + 1095: "mac:WindowDidUpdate", + 1096: "mac:WindowDidUpdateAlpha", + 1097: "mac:WindowDidUpdateCollectionBehavior", + 1098: "mac:WindowDidUpdateCollectionProperties", + 1099: "mac:WindowDidUpdateShadow", + 1100: "mac:WindowDidUpdateTitle", + 1101: "mac:WindowDidUpdateToolbar", + 1102: "mac:WindowShouldClose!", + 1103: "mac:WindowWillBecomeKey", + 1104: "mac:WindowWillBecomeMain", + 1105: "mac:WindowWillBeginSheet", + 1106: "mac:WindowWillChangeOrderingMode", + 1107: "mac:WindowWillClose", + 1108: "mac:WindowWillDeminiaturize", + 1109: "mac:WindowWillEnterFullScreen", + 1110: "mac:WindowWillEnterVersionBrowser", + 1111: "mac:WindowWillExitFullScreen", + 1112: "mac:WindowWillExitVersionBrowser", + 1113: "mac:WindowWillFocus", + 1114: "mac:WindowWillMiniaturize", + 1115: "mac:WindowWillMove", + 1116: "mac:WindowWillOrderOffScreen", + 1117: "mac:WindowWillOrderOnScreen", + 1118: "mac:WindowWillResignMain", + 1119: "mac:WindowWillResize", + 1120: "mac:WindowWillUnfocus", + 1121: "mac:WindowWillUpdate", + 1122: "mac:WindowWillUpdateAlpha", + 1123: "mac:WindowWillUpdateCollectionBehavior", + 1124: "mac:WindowWillUpdateCollectionProperties", + 1125: "mac:WindowWillUpdateShadow", + 1126: "mac:WindowWillUpdateTitle", + 1127: "mac:WindowWillUpdateToolbar", + 1128: "mac:WindowWillUpdateVisibility", + 1129: "mac:WindowWillUseStandardFrame", + 1130: "mac:MenuWillOpen", + 1131: "mac:MenuDidOpen", + 1132: "mac:MenuDidClose", + 1133: "mac:MenuWillSendAction", + 1134: "mac:MenuDidSendAction", + 1135: "mac:MenuWillHighlightItem", + 1136: "mac:MenuDidHighlightItem", + 1137: "mac:MenuWillDisplayItem", + 1138: "mac:MenuDidDisplayItem", + 1139: "mac:MenuWillAddItem", + 1140: "mac:MenuDidAddItem", + 1141: "mac:MenuWillRemoveItem", + 1142: "mac:MenuDidRemoveItem", + 1143: "mac:MenuWillBeginTracking", + 1144: "mac:MenuDidBeginTracking", + 1145: "mac:MenuWillEndTracking", + 1146: "mac:MenuDidEndTracking", + 1147: "mac:MenuWillUpdate", + 1148: "mac:MenuDidUpdate", + 1149: "mac:MenuWillPopUp", + 1150: "mac:MenuDidPopUp", + 1151: "mac:MenuWillSendActionToItem", + 1152: "mac:MenuDidSendActionToItem", + 1153: "mac:WebViewDidStartProvisionalNavigation", + 1154: "mac:WebViewDidReceiveServerRedirectForProvisionalNavigation", + 1155: "mac:WebViewDidFinishNavigation", + 1156: "mac:WebViewDidCommitNavigation", + 1157: "mac:WindowFileDraggingEntered", + 1158: "mac:WindowFileDraggingPerformed", + 1159: "mac:WindowFileDraggingExited", + 1160: "windows:SystemThemeChanged", + 1161: "windows:APMPowerStatusChange", + 1162: "windows:APMSuspend", + 1163: "windows:APMResumeAutomatic", + 1164: "windows:APMResumeSuspend", + 1165: "windows:APMPowerSettingChange", + 1166: "windows:ApplicationStarted", + 1167: "windows:WebViewNavigationCompleted", + 1168: "windows:WindowInactive", + 1169: "windows:WindowActive", + 1170: "windows:WindowClickActive", + 1171: "windows:WindowMaximise", + 1172: "windows:WindowUnMaximise", + 1173: "windows:WindowFullscreen", + 1174: "windows:WindowUnFullscreen", + 1175: "windows:WindowRestore", + 1176: "windows:WindowMinimise", + 1177: "windows:WindowUnMinimise", + 1178: "windows:WindowClose", + 1179: "windows:WindowSetFocus", + 1180: "windows:WindowKillFocus", + 1181: "windows:WindowDragDrop", + 1182: "windows:WindowDragEnter", + 1183: "windows:WindowDragLeave", + 1184: "windows:WindowDragOver", + 1185: "windows:WindowDidMove", + 1186: "windows:WindowDidResize", + 1187: "windows:WindowShow", + 1188: "windows:WindowHide", + 1189: "windows:WindowStartMove", + 1190: "windows:WindowEndMove", + 1191: "windows:WindowStartResize", + 1192: "windows:WindowEndResize", + 1193: "windows:WindowKeyDown", + 1194: "windows:WindowKeyUp", + 1195: "windows:WindowZOrderChanged", + 1196: "windows:WindowPaint", + 1197: "windows:WindowBackgroundErase", + 1198: "windows:WindowNonClientHit", + 1199: "windows:WindowNonClientMouseDown", + 1200: "windows:WindowNonClientMouseUp", + 1201: "windows:WindowNonClientMouseMove", + 1202: "windows:WindowNonClientMouseLeave", + 1203: "common:ApplicationStarted", + 1204: "common:WindowMaximise", + 1205: "common:WindowUnMaximise", + 1206: "common:WindowFullscreen", + 1207: "common:WindowUnFullscreen", + 1208: "common:WindowRestore", + 1209: "common:WindowMinimise", + 1210: "common:WindowUnMinimise", + 1211: "common:WindowClosing", + 1212: "common:WindowZoom", + 1213: "common:WindowZoomIn", + 1214: "common:WindowZoomOut", + 1215: "common:WindowZoomReset", + 1216: "common:WindowFocus", + 1217: "common:WindowLostFocus", + 1218: "common:WindowShow", + 1219: "common:WindowHide", + 1220: "common:WindowDPIChanged", + 1221: "common:WindowFilesDropped", + 1222: "common:WindowRuntimeReady", + 1223: "common:ThemeChanged", + 1224: "common:WindowDidMove", + 1225: "common:WindowDidResize", + 1226: "common:ApplicationOpenedWithFile", } diff --git a/v3/pkg/events/events.txt b/v3/pkg/events/events.txt index e4e82ee14..724f8c90e 100644 --- a/v3/pkg/events/events.txt +++ b/v3/pkg/events/events.txt @@ -48,10 +48,15 @@ mac:WindowDidChangeSpace mac:WindowDidChangeSpaceOrderingMode mac:WindowDidChangeTitle mac:WindowDidChangeToolbar -mac:WindowDidChangeVisibility mac:WindowDidDeminiaturize mac:WindowDidEndSheet mac:WindowDidEnterFullScreen +mac:WindowMaximise +mac:WindowUnMaximise +mac:WindowDidZoom! +mac:WindowZoomIn! +mac:WindowZoomOut! +mac:WindowZoomReset! mac:WindowDidEnterVersionBrowser mac:WindowDidExitFullScreen mac:WindowDidExitVersionBrowser @@ -71,7 +76,6 @@ mac:WindowDidUpdateCollectionProperties mac:WindowDidUpdateShadow mac:WindowDidUpdateTitle mac:WindowDidUpdateToolbar -mac:WindowDidUpdateVisibility mac:WindowShouldClose! mac:WindowWillBecomeKey mac:WindowWillBecomeMain @@ -157,6 +161,22 @@ windows:WindowDragLeave windows:WindowDragOver windows:WindowDidMove windows:WindowDidResize +windows:WindowShow +windows:WindowHide +windows:WindowStartMove +windows:WindowEndMove +windows:WindowStartResize +windows:WindowEndResize +windows:WindowKeyDown +windows:WindowKeyUp +windows:WindowZOrderChanged +windows:WindowPaint +windows:WindowBackgroundErase +windows:WindowNonClientHit +windows:WindowNonClientMouseDown +windows:WindowNonClientMouseUp +windows:WindowNonClientMouseMove +windows:WindowNonClientMouseLeave common:ApplicationStarted common:WindowMaximise common:WindowUnMaximise diff --git a/v3/pkg/events/events_darwin.h b/v3/pkg/events/events_darwin.h index 14dc87242..4e551ea0e 100644 --- a/v3/pkg/events/events_darwin.h +++ b/v3/pkg/events/events_darwin.h @@ -48,90 +48,94 @@ extern void processWindowEvent(unsigned int, unsigned int); #define EventWindowDidChangeSpaceOrderingMode 1071 #define EventWindowDidChangeTitle 1072 #define EventWindowDidChangeToolbar 1073 -#define EventWindowDidChangeVisibility 1074 -#define EventWindowDidDeminiaturize 1075 -#define EventWindowDidEndSheet 1076 -#define EventWindowDidEnterFullScreen 1077 -#define EventWindowDidEnterVersionBrowser 1078 -#define EventWindowDidExitFullScreen 1079 -#define EventWindowDidExitVersionBrowser 1080 -#define EventWindowDidExpose 1081 -#define EventWindowDidFocus 1082 -#define EventWindowDidMiniaturize 1083 -#define EventWindowDidMove 1084 -#define EventWindowDidOrderOffScreen 1085 -#define EventWindowDidOrderOnScreen 1086 -#define EventWindowDidResignKey 1087 -#define EventWindowDidResignMain 1088 -#define EventWindowDidResize 1089 -#define EventWindowDidUpdate 1090 -#define EventWindowDidUpdateAlpha 1091 -#define EventWindowDidUpdateCollectionBehavior 1092 -#define EventWindowDidUpdateCollectionProperties 1093 -#define EventWindowDidUpdateShadow 1094 -#define EventWindowDidUpdateTitle 1095 -#define EventWindowDidUpdateToolbar 1096 -#define EventWindowDidUpdateVisibility 1097 -#define EventWindowShouldClose 1098 -#define EventWindowWillBecomeKey 1099 -#define EventWindowWillBecomeMain 1100 -#define EventWindowWillBeginSheet 1101 -#define EventWindowWillChangeOrderingMode 1102 -#define EventWindowWillClose 1103 -#define EventWindowWillDeminiaturize 1104 -#define EventWindowWillEnterFullScreen 1105 -#define EventWindowWillEnterVersionBrowser 1106 -#define EventWindowWillExitFullScreen 1107 -#define EventWindowWillExitVersionBrowser 1108 -#define EventWindowWillFocus 1109 -#define EventWindowWillMiniaturize 1110 -#define EventWindowWillMove 1111 -#define EventWindowWillOrderOffScreen 1112 -#define EventWindowWillOrderOnScreen 1113 -#define EventWindowWillResignMain 1114 -#define EventWindowWillResize 1115 -#define EventWindowWillUnfocus 1116 -#define EventWindowWillUpdate 1117 -#define EventWindowWillUpdateAlpha 1118 -#define EventWindowWillUpdateCollectionBehavior 1119 -#define EventWindowWillUpdateCollectionProperties 1120 -#define EventWindowWillUpdateShadow 1121 -#define EventWindowWillUpdateTitle 1122 -#define EventWindowWillUpdateToolbar 1123 -#define EventWindowWillUpdateVisibility 1124 -#define EventWindowWillUseStandardFrame 1125 -#define EventMenuWillOpen 1126 -#define EventMenuDidOpen 1127 -#define EventMenuDidClose 1128 -#define EventMenuWillSendAction 1129 -#define EventMenuDidSendAction 1130 -#define EventMenuWillHighlightItem 1131 -#define EventMenuDidHighlightItem 1132 -#define EventMenuWillDisplayItem 1133 -#define EventMenuDidDisplayItem 1134 -#define EventMenuWillAddItem 1135 -#define EventMenuDidAddItem 1136 -#define EventMenuWillRemoveItem 1137 -#define EventMenuDidRemoveItem 1138 -#define EventMenuWillBeginTracking 1139 -#define EventMenuDidBeginTracking 1140 -#define EventMenuWillEndTracking 1141 -#define EventMenuDidEndTracking 1142 -#define EventMenuWillUpdate 1143 -#define EventMenuDidUpdate 1144 -#define EventMenuWillPopUp 1145 -#define EventMenuDidPopUp 1146 -#define EventMenuWillSendActionToItem 1147 -#define EventMenuDidSendActionToItem 1148 -#define EventWebViewDidStartProvisionalNavigation 1149 -#define EventWebViewDidReceiveServerRedirectForProvisionalNavigation 1150 -#define EventWebViewDidFinishNavigation 1151 -#define EventWebViewDidCommitNavigation 1152 -#define EventWindowFileDraggingEntered 1153 -#define EventWindowFileDraggingPerformed 1154 -#define EventWindowFileDraggingExited 1155 +#define EventWindowDidDeminiaturize 1074 +#define EventWindowDidEndSheet 1075 +#define EventWindowDidEnterFullScreen 1076 +#define EventWindowMaximise 1077 +#define EventWindowUnMaximise 1078 +#define EventWindowDidZoom 1079 +#define EventWindowZoomIn 1080 +#define EventWindowZoomOut 1081 +#define EventWindowZoomReset 1082 +#define EventWindowDidEnterVersionBrowser 1083 +#define EventWindowDidExitFullScreen 1084 +#define EventWindowDidExitVersionBrowser 1085 +#define EventWindowDidExpose 1086 +#define EventWindowDidFocus 1087 +#define EventWindowDidMiniaturize 1088 +#define EventWindowDidMove 1089 +#define EventWindowDidOrderOffScreen 1090 +#define EventWindowDidOrderOnScreen 1091 +#define EventWindowDidResignKey 1092 +#define EventWindowDidResignMain 1093 +#define EventWindowDidResize 1094 +#define EventWindowDidUpdate 1095 +#define EventWindowDidUpdateAlpha 1096 +#define EventWindowDidUpdateCollectionBehavior 1097 +#define EventWindowDidUpdateCollectionProperties 1098 +#define EventWindowDidUpdateShadow 1099 +#define EventWindowDidUpdateTitle 1100 +#define EventWindowDidUpdateToolbar 1101 +#define EventWindowShouldClose 1102 +#define EventWindowWillBecomeKey 1103 +#define EventWindowWillBecomeMain 1104 +#define EventWindowWillBeginSheet 1105 +#define EventWindowWillChangeOrderingMode 1106 +#define EventWindowWillClose 1107 +#define EventWindowWillDeminiaturize 1108 +#define EventWindowWillEnterFullScreen 1109 +#define EventWindowWillEnterVersionBrowser 1110 +#define EventWindowWillExitFullScreen 1111 +#define EventWindowWillExitVersionBrowser 1112 +#define EventWindowWillFocus 1113 +#define EventWindowWillMiniaturize 1114 +#define EventWindowWillMove 1115 +#define EventWindowWillOrderOffScreen 1116 +#define EventWindowWillOrderOnScreen 1117 +#define EventWindowWillResignMain 1118 +#define EventWindowWillResize 1119 +#define EventWindowWillUnfocus 1120 +#define EventWindowWillUpdate 1121 +#define EventWindowWillUpdateAlpha 1122 +#define EventWindowWillUpdateCollectionBehavior 1123 +#define EventWindowWillUpdateCollectionProperties 1124 +#define EventWindowWillUpdateShadow 1125 +#define EventWindowWillUpdateTitle 1126 +#define EventWindowWillUpdateToolbar 1127 +#define EventWindowWillUpdateVisibility 1128 +#define EventWindowWillUseStandardFrame 1129 +#define EventMenuWillOpen 1130 +#define EventMenuDidOpen 1131 +#define EventMenuDidClose 1132 +#define EventMenuWillSendAction 1133 +#define EventMenuDidSendAction 1134 +#define EventMenuWillHighlightItem 1135 +#define EventMenuDidHighlightItem 1136 +#define EventMenuWillDisplayItem 1137 +#define EventMenuDidDisplayItem 1138 +#define EventMenuWillAddItem 1139 +#define EventMenuDidAddItem 1140 +#define EventMenuWillRemoveItem 1141 +#define EventMenuDidRemoveItem 1142 +#define EventMenuWillBeginTracking 1143 +#define EventMenuDidBeginTracking 1144 +#define EventMenuWillEndTracking 1145 +#define EventMenuDidEndTracking 1146 +#define EventMenuWillUpdate 1147 +#define EventMenuDidUpdate 1148 +#define EventMenuWillPopUp 1149 +#define EventMenuDidPopUp 1150 +#define EventMenuWillSendActionToItem 1151 +#define EventMenuDidSendActionToItem 1152 +#define EventWebViewDidStartProvisionalNavigation 1153 +#define EventWebViewDidReceiveServerRedirectForProvisionalNavigation 1154 +#define EventWebViewDidFinishNavigation 1155 +#define EventWebViewDidCommitNavigation 1156 +#define EventWindowFileDraggingEntered 1157 +#define EventWindowFileDraggingPerformed 1158 +#define EventWindowFileDraggingExited 1159 -#define MAX_EVENTS 1156 +#define MAX_EVENTS 1160 #endif \ No newline at end of file diff --git a/v3/pkg/w32/window.go b/v3/pkg/w32/window.go index 877a385f1..eb75e3ef1 100644 --- a/v3/pkg/w32/window.go +++ b/v3/pkg/w32/window.go @@ -34,6 +34,15 @@ const ( GCLP_HICON int32 = -14 ) +type WINDOWPOS struct { + HwndInsertAfter HWND + X int32 + Y int32 + Cx int32 + Cy int32 + Flags uint32 +} + func ExtendFrameIntoClientArea(hwnd uintptr, extend bool) error { // -1: Adds the default frame styling (aero shadow and e.g. rounded corners on Windows 11) // Also shows the caption buttons if transparent ant translucent but they don't work. diff --git a/v3/tasks/events/go.sum b/v3/tasks/events/go.sum new file mode 100644 index 000000000..2379260c6 --- /dev/null +++ b/v3/tasks/events/go.sum @@ -0,0 +1,11 @@ +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=