5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 07:00:39 +08:00
Commit Graph

49 Commits

Author SHA1 Message Date
Lea Anthony
4cd4b46772 [WIP] refactor CGO methods 2024-03-06 11:42:19 -06:00
Lea Anthony
3d93c83920 Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 11:42:19 -06:00
Lea Anthony
4c7b643295 Add webview GPU policy and update Linux options
The commit introduces a set of webview GPU policies to control hardware acceleration. These policies define when hardware acceleration is enabled on the webview. An option for this has been added to the LinuxWindow struct for Linux specific windows. Additional code modification was carried out to use this new GPU policy option when calling `windowNew` function. Finally, the sequence of the GPU Policies in the const declaration has been updated for better readability.
2024-03-06 11:42:19 -06:00
Lea Anthony
05b16f1d63 Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:42:19 -06:00
Lea Anthony
bfa53dfd6c Update windowSetupSignalHandlers & linux events 2024-03-06 11:42:19 -06:00
Travis McLane
53ea6511fc [v3 linux] correct bug in getScreenByIndex 2023-11-09 21:11:35 -06:00
Travis McLane
6f197f67f1 [linux] remove deprecated version of webkit callback handling 2023-11-08 22:31:05 -06:00
Travis McLane
385b1dbfd4 [linux] implement 'script-message-received' handling
- use unsafe.Pointers for 'signal_connect'
- add handler for 'script-message-received::external'
  need to update this to handle older versions of webkit2gtk better
  currently removed the ifdef guards (since they don't work in Go code
  directly) - need to reimplement using build tags if required.
2023-11-06 23:29:03 -06:00
Travis McLane
f787cf4bc2 [v3 linux] show dev tools if OpenInspectorAtStartup=true 2023-11-06 12:04:20 -06:00
Travis McLane
9f6cd35155 [v3 linux] stop key-press event propagation 2023-11-06 10:49:14 -06:00
atterpac
f122db2e7b Linux Keybinds
- Adds getKeyboardState into linux_cgo to parse keypress event and transfer it into
  an accelerator for the handleKeyEvent using GDK keycodes
2023-11-06 10:49:11 -06:00
Travis McLane
0fc535f2f1 [v3 linux] contextMenus 2023-11-06 10:41:14 -06:00
Travis McLane
8dbbdc4bf2 [v3 linux] sanitize appId more thoroughly 2023-11-06 10:41:14 -06:00
Travis McLane
144567410d [v3 linux] disable noisy onKeyPressEvent handler 2023-10-31 17:22:36 -05:00
Travis McLane
a81581129a [v3 linux] menu bitmap update handling 2023-10-27 16:45:10 -05:00
Travis McLane
e95a91861a [v3 linux] noop: cleanup 2023-10-27 16:45:10 -05:00
Travis McLane
fa5948f40e use windowId to avoid miscompilation 2023-10-27 15:46:25 -05:00
Travis McLane
ad4c8aacfb [v3 linux] keypress handling stubout 2023-10-27 14:41:22 -05:00
Travis McLane
afbc09f1e7 [v3 linux] menuItem.setBitmap support 2023-10-26 16:56:06 -05:00
Lea Anthony
36b4b3695b
Initial menu item bitmap support 2023-10-22 09:32:04 +11:00
Travis McLane
263e1b527a [v3 linux] lower signal memory usage
- drop the gtkSignalHandlers map entirely (wasn't used)
- use 'uint' for mapping signal IDs to MenuItem
- store and retrieve the menuitem identifier to/from the menu item widget
2023-10-10 12:38:10 -05:00
Travis McLane
dbcf65b2d6 Revert "Merge branch 'v3-alpha-linux-systray' into v3-alpha"
This reverts commit 92b26488da, reversing
changes made to 1c48d567e1.
2023-10-05 08:34:12 -05:00
Travis McLane
757a4383e6 [v3] send dialog results over channels 2023-10-02 11:07:12 -05:00
Travis McLane
7c98ee329a [v3] move linux clipboard logic to linux_cgo 2023-10-02 11:07:12 -05:00
Lea Anthony
9d615463f4
[linux] support clipboard 2023-10-02 20:47:04 +11:00
Travis McLane
af54419a0b [v3] use concrete *WebviewWindow 2023-09-29 11:40:43 -05:00
Travis McLane
8e2527ad35 [v3 linux] implement single_instance plugin 2023-09-28 15:53:28 -05:00
Travis McLane
efa67cb01c [v3 linux] systray implementation
Linux requires a `gtk_menu_bar` for a gtk_window to display a menu.
For the `systray` a `gtk_menu` is needed instead.
This change creates the correct type of `impl` for the `Menu`
depending on how it is being used.
2023-09-28 14:50:38 -05:00
Travis McLane
71fc222059 [v3 linux] systray: cleanup + add basic menu 2023-09-28 13:31:09 -05:00
Travis McLane
fa6adad4ab [v3 linux] wip: systray implementation 2023-09-28 13:31:09 -05:00
Travis McLane
c87489adf3 [v3] implement Window interface 2023-09-28 11:39:39 -05:00
Travis McLane
56b0fcebba [v3 linux] use ifdef for APPLICATION_DEFAULT_FLAGS 2023-09-27 09:53:53 -05:00
Travis McLane
fff266f50d [v3 linux] remove unused dialog callbacks
If it turns out these are needed in the future
we can add them back in then.
2023-09-13 13:12:22 -05:00
Travis McLane
7cfea7c22c [v3 linux] file/directory dialogs 2023-09-13 13:12:22 -05:00
Lea Anthony
bb3a0cc54f
Add WebviewWindow.IsFocused() 2023-09-13 08:57:20 +10:00
Travis McLane
a6cfdbb403 [v3 linux] const -> var 2023-09-11 17:26:59 -05:00
Travis McLane
2f7c6834d0 [v3 linux] use invokeSync 2023-09-11 17:12:57 -05:00
Vilsol
499ff50903
fix: use string formatting in gtk_message_dialog_new (#2865) 2023-08-28 19:34:24 +10:00
Travis McLane
bd9f7deb98 [v3 linux] correct minimum zoom 2023-08-23 14:10:22 -05:00
Travis McLane
2171192934 [v3 linux] noop: remove println 2023-08-23 14:09:44 -05:00
Lea Anthony
db836b7a48
Move assetserver to internal 2023-08-14 08:31:55 +10:00
Lea Anthony
15f602f867
Move v2 assetserver to v3 2023-08-12 14:16:53 +10:00
Lea Anthony
3827ca2d78
[v3] Move dialogs out of application 2023-06-24 13:57:51 +10:00
Travis McLane
1a7d105917 [v3 linux] GetAbsolutePosition 2023-06-23 21:50:51 -05:00
Travis McLane
de5cff799e [v3 linux] setEnabled 2023-06-23 21:50:51 -05:00
Travis McLane
1a09a8a4c8 [v3 linux/cgo] open/save file dialog stub 2023-06-23 21:50:51 -05:00
Travis McLane
daa0cf83d9 [v3 linux] noop: remove fmt.Println 2023-06-23 21:50:51 -05:00
Travis McLane
d52c26e82f [v3 linux] implement missing functions 2023-06-23 21:50:51 -05:00
Travis McLane
bef454f950 [v3 linux] initial linux implementation 2023-06-23 21:50:51 -05:00