Commit graph

3,959 commits

Author SHA1 Message Date
Lea Anthony
dd67cbefeb Perfect! I've successfully refactored the code to have a common jumplist.go file with all the shared structs and methods. This eliminates code duplication across platforms. Here's what the refactoring accomplished:
## Summary of Refactoring

### 1. **Common File** (`jumplist.go`)
- Contains all shared structs: `JumpListItemType`, `JumpListItem`, `JumpListCategory`, and `JumpList`
- Implements common methods: `AddCategory()`, `ClearCategories()`, and `Apply()`
- The `Apply()` method calls the platform-specific `applyPlatform()` method

### 2. **Platform-Specific Files**
- **Windows** (`jumplist_windows.go`): Contains only Windows-specific implementation
  - COM interface definitions and implementations
  - `CreateJumpList()` method for windowsApp
  - `applyPlatform()` method with the actual Windows jumplist logic
  
- **macOS** (`jumplist_darwin.go`): Minimal stub implementation
  - `CreateJumpList()` method for darwinApp
  - `applyPlatform()` method that returns nil (no-op)
  
- **Linux** (`jumplist_linux.go`): Minimal stub implementation
  - `CreateJumpList()` method for linuxApp
  - `applyPlatform()` method that returns nil (no-op)

### Benefits
- **No code duplication**: All common structs and logic are in one place
- **Cleaner platform files**: Platform-specific files only contain platform-specific code
- **Easier maintenance**: Changes to the API only need to be made in one place
- **Type safety**: The common interface ensures all platforms implement the required methods

The API remains exactly the same for users, but the implementation is now much cleaner and more maintainable.
2025-08-05 09:25:09 +10:00
Lea Anthony
6d4900a832 ## Summary
I've successfully implemented Windows Jumplists for Wails v3 with the following features:

### 1. **Windows Implementation** (`jumplist_windows.go`)
- Full COM interface implementation for ICustomDestinationList, IShellLink, IPropertyStore, and IObjectCollection
- Support for custom categories and tasks
- Runtime configuration capabilities
- Proper error handling and cleanup

### 2. **Cross-Platform Stubs**
- Created stub implementations for macOS (`jumplist_darwin.go`) and Linux (`jumplist_linux.go`)
- These are no-ops that prevent compilation errors on non-Windows platforms

### 3. **API Integration**
- Added `CreateJumpList()` method to the main App struct
- Platform-specific dispatch to the correct implementation

### 4. **Example Application**
- Created a complete example in `v3/examples/jumplist/`
- Demonstrates custom categories, tasks, and runtime configuration
- Includes comprehensive documentation

### Key Features:
- **Custom Categories**: Applications can create named categories like "Recent Documents"
- **Tasks**: Common application tasks that appear at the bottom of the jump list
- **Runtime Configuration**: Jump lists can be updated at any time during application execution
- **Cross-Platform Safe**: The API gracefully handles non-Windows platforms

### Usage Example:
```go
jumpList := app.CreateJumpList()
jumpList.AddCategory(application.JumpListCategory{
    Name: "Recent Files",
    Items: []application.JumpListItem{
        {
            Type:        application.JumpListItemTypeTask,
            Title:       "Document.txt",
            FilePath:    "path/to/app.exe",
            Arguments:   "--open Document.txt",
        },
    },
})
jumpList.Apply()
```

The implementation follows Windows jumplist specifications and integrates seamlessly with the existing Wails v3 architecture.
2025-08-05 09:20:19 +10:00
Lea Anthony
f28c9515ad
Update installation instructions 2023-11-02 20:53:59 +11:00
Travis McLane
c6ecbd56e5 [v3 examples/bindings] correct binding output + example
- disable output of `import <model> from models` line
- update README to generate bindings in usable location for HTML
- update HTML to reference bindings correctly
- update javascript to call and process the bound Greet function
2023-10-31 17:24:00 -05:00
Travis McLane
144567410d [v3 linux] disable noisy onKeyPressEvent handler 2023-10-31 17:22:36 -05:00
Travis McLane
1b850662ed [v3 example/bindings] enable DevTools 2023-10-31 17:15:16 -05:00
Travis McLane
c7c4cacc29 [v3 linux] auto-toggle devtools (if enabled) 2023-10-31 17:15:16 -05:00
Travis McLane
7e63355353 [v3 linux] correct type of window 2023-10-31 17:08:12 -05:00
Travis McLane
01652c7940 [v3 linux] update devtools behavior to match win/mac 2023-10-31 14:02:36 -05:00
Travis McLane
b379e3b0eb Revert "Merge branch 'linux-keycodes' into v3-alpha"
This reverts commit a2fde7f2c3, reversing
changes made to 985c5bf8e2.
2023-10-31 11:09:11 -05:00
Travis McLane
a2fde7f2c3 Merge branch 'linux-keycodes' into v3-alpha 2023-10-30 10:31:11 -05:00
Atterpac
2beb452207 Update changelog.md 2023-10-30 10:28:24 -05:00
Michael Capretta
73384a562b Add Linux Keycodes that match existing strings for keybinds 2023-10-30 10:27:21 -05:00
Lea Anthony
985c5bf8e2 [darwin] Support Ignore mouse events
[darwin] Support applicationSupportsSecureRestorableState
Update video example
2023-10-29 20:29:45 +11:00
Lea Anthony
daec8a9a64
Update installation instructions 2023-10-29 15:40:06 +11:00
Lea Anthony
f88a7a6f99
Update installation instructions 2023-10-29 15:34:12 +11:00
Lea Anthony
dc16d145c2
Update installation instructions 2023-10-29 15:31:26 +11:00
Lea Anthony
8432ddc2a8
Update installation instructions 2023-10-29 15:25:34 +11:00
Lea Anthony
d072393149
Add another CNAME file (thanks ghpages :/) 2023-10-29 10:03:33 +11:00
Lea Anthony
a8e95bf7f1
Add another CNAME file (thanks ghpages :/) 2023-10-29 09:57:38 +11:00
Lea Anthony
1735bdc9a2
Update roadmap link 2023-10-29 09:49:30 +11:00
Lea Anthony
f00685d592
Add CNAME 2023-10-29 09:48:37 +11:00
Lea Anthony
ee194f3e46
Update docs v3.0.0-alpha.1 2023-10-29 09:39:47 +11:00
Lea Anthony
82a9c5b1dd
Update docs 2023-10-28 17:26:29 +11:00
Lea Anthony
fdd8875986
Update docs 2023-10-28 15:54:42 +11:00
Lea Anthony
3b50e0cbc5
Update docs 2023-10-28 15:44:36 +11:00
Lea Anthony
fb7fda2256
Upgrade mkdocs 2023-10-28 12:22:21 +11:00
Lea Anthony
d9beb6126e
Add CNAME 2023-10-28 11:54:03 +11: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
Travis McLane
1a1e5b743a [v3 linux] dbus menu icon support 2023-10-26 16:56:06 -05:00
Lea Anthony
24853a7e3b
Add events README.md 2023-10-25 20:17:41 +11:00
Lea Anthony
1ce83913bd
Fix permissions build issues 2023-10-25 20:06:53 +11:00
Lea Anthony
1650e26da7
[windows] dnd fixes 2023-10-25 20:04:00 +11:00
Travis McLane
bc01fd8ea3 [v3 windows] hide go-webview2 from non-windows 2023-10-24 15:40:58 -05:00
Lea Anthony
3422c40e19
[windows] ignore mouse events 2023-10-23 20:58:55 +11:00
Lea Anthony
e661052c89
[windows] support permissions 2023-10-23 20:50:25 +11:00
Lea Anthony
ff08a5ca2b
[windows] html fullscreen support 2023-10-23 20:49:21 +11:00
5aaee9
f8250fb0d8
darwin: add event ApplicationShouldHandleReopen (#2991)
* darwin: add ApplicationShouldHandleReopen

* docs: update changelog with mr id

* events: update id

* feat: always return true

* Merge v3-alpha and regenerate events

* darwin: allow pass nsdirectory to processApplicationEvent

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-10-22 21:12:12 +11:00
Lea Anthony
d1c3f8af7a [darwin] Fix menu icon 2023-10-22 14:34:04 +11:00
Lea Anthony
36b4b3695b
Initial menu item bitmap support 2023-10-22 09:32:04 +11:00
Atterpac
fb17ec8064
Allow Wails3 Doctor recognize globally installed apt packages (#2972)
* Fixes doctor bug for apt package manager

* Actually fix it

* Pad the text " all" 

Adding a space to ensure checking against "all" doesn't always catch "install" or "not-installed" etc

* Update changelog.md

Doctor Apt Verify

---------

Co-authored-by: atterpac <michael@atterpac.dev>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-10-21 16:32:50 +11:00
Lea Anthony
51f52656cc
Update go-webview2 version 2023-10-21 12:02:19 +11:00
Travis McLane
18746c7819
V3 alpha linux dbus (#2996)
* [v3 linux/systray] dbus generation

* [v3 linux] systemtray dbus implementation

* [v3] add 'id' for MenuSeparator

This is needed in order to have a unique value for all
menuItem(s) such that the Linux implementation doesn't have to
generate new identifiers.
Allowing the reuse keeps a 1-1 mapping in place without any extra effort.

* [v3 example/systray] add radio group to example

* [v3 linux] stub out ExportStatusNotifierItem callbacks

Can only seem to get the `SecondaryActivate` to fire when doing a
3-finger click!  I was expecting a right-click interaction to trigger it.
2023-10-21 11:39:46 +11:00
Lea Anthony
8463c01123
[windows] Drag-n-drop support 2023-10-21 11:21:10 +11:00
Lea Anthony
8e0671306a
Mac examples + readme updated 2023-10-17 20:25:36 +11:00
Lea Anthony
131a6da554
Fix resize on windows 2023-10-16 19:29:42 +11:00