mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 06:19:43 +08:00
fix: fix go test
errors (#2169)
* fix: fix go test errors * Add flags to mac test * Run on all branches * Update PR workflow Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
606ce3de1d
commit
f70d9de366
12
.github/workflows/build-and-test.yml
vendored
12
.github/workflows/build-and-test.yml
vendored
@ -2,7 +2,7 @@ name: Build + Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [*]
|
||||
branches: [release/*, master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@ -28,7 +28,15 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
|
13
.github/workflows/pr.yml
vendored
13
.github/workflows/pr.yml
vendored
@ -48,7 +48,14 @@ jobs:
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: |
|
||||
go test -v ./...
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Push
|
||||
name: Push Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -2,6 +2,11 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/leaanthony/slicer"
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
@ -10,10 +15,6 @@ import (
|
||||
"github.com/wailsapp/wails/v2/internal/project"
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/build"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func buildApplication(f *flags.Build) error {
|
||||
@ -167,12 +168,12 @@ func buildApplication(f *flags.Build) error {
|
||||
switch buildOptions.Platform {
|
||||
case "linux":
|
||||
if runtime.GOOS != "linux" {
|
||||
pterm.Warning.Println("Crosscompiling to Linux not currently supported.\n")
|
||||
pterm.Warning.Println("Crosscompiling to Linux not currently supported.")
|
||||
return
|
||||
}
|
||||
case "darwin":
|
||||
if runtime.GOOS != "darwin" {
|
||||
pterm.Warning.Println("Crosscompiling to Mac not currently supported.\n")
|
||||
pterm.Warning.Println("Crosscompiling to Mac not currently supported.")
|
||||
return
|
||||
}
|
||||
macTargets := targets.Filter(func(platform string) bool {
|
||||
|
@ -1,14 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/internal/system"
|
||||
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
@ -144,7 +145,7 @@ func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
|
||||
pterm.Println("Your system is ready for Wails development!")
|
||||
} else {
|
||||
pterm.Println("Your system has missing dependencies!\n")
|
||||
pterm.Println("Your system has missing dependencies!")
|
||||
}
|
||||
|
||||
if dependenciesAvailableRequired != 0 {
|
||||
|
@ -2,11 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
|
||||
"github.com/leaanthony/clir"
|
||||
@ -52,7 +53,7 @@ func printFooter() {
|
||||
},
|
||||
}
|
||||
printer.Println("If Wails is useful to you or your company, please consider sponsoring the project:")
|
||||
pterm.Println("https://github.com/sponsors/leaanthony\n")
|
||||
pterm.Println("https://github.com/sponsors/leaanthony")
|
||||
}
|
||||
|
||||
func bool2Str(b bool) string {
|
||||
|
@ -2,12 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/labstack/gommon/color"
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/internal/shell"
|
||||
"os"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/github"
|
||||
)
|
||||
@ -76,7 +77,7 @@ func updateToVersion(targetVersion *github.SemanticVersion, force bool, currentV
|
||||
var targetVersionString = "v" + targetVersion.String()
|
||||
|
||||
if targetVersionString == currentVersion {
|
||||
pterm.Println("\nLooks like you're up to date!\n")
|
||||
pterm.Println("\nLooks like you're up to date!")
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -122,7 +123,8 @@ func updateToVersion(targetVersion *github.SemanticVersion, force bool, currentV
|
||||
// Compare
|
||||
if !success {
|
||||
pterm.Println("Error: The requested version is lower than the current version.")
|
||||
pterm.Println("If this is what you really want to do, use `wails update -version %s`", targetVersionString)
|
||||
pterm.Println(fmt.Sprintf("If this is what you really want to do, use `wails update -version "+"%s`", targetVersionString))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
//go:build windows
|
||||
|
||||
package windows
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/frontend"
|
||||
"golang.org/x/sys/windows"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_calculateMessageDialogFlags(t *testing.T) {
|
||||
|
@ -1,10 +1,13 @@
|
||||
//go:build windows
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"syscall"
|
||||
"unicode/utf16"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package combridge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package combridge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package combridge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package combridge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package combridge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_COLOR struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND uint32
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_KEY_EVENT_KIND uint32
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_MOVE_FOCUS_REASON uint32
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_PHYSICAL_KEY_STATUS struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type COREWEBVIEW2_WEB_RESOURCE_CONTEXT uint32
|
||||
|
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
type _ICoreWebView2AcceleratorKeyPressedEventArgsVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type _ICoreWebView2AcceleratorKeyPressedEventHandlerVtbl struct {
|
||||
|
@ -1,10 +1,13 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
|
||||
"golang.org/x/sys/windows"
|
||||
"math"
|
||||
"unsafe"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/go-webview2/internal/w32"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
type _ICoreWebView2ControllerVtbl struct {
|
||||
|
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
type _ICoreWebView2Controller2Vtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type _ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type _ICoreWebView2NavigationCompletedEventArgsVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type _ICoreWebView2NavigationCompletedEventHandlerVtbl struct {
|
||||
|
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
type _ICoreWebView2SettingsVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
type _ICoreWebView2WebResourceRequestedEventArgsVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type _ICoreWebView2WebResourceRequestedEventHandlerVtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import "unsafe"
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
type iCoreWebView2_2Vtbl struct {
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
import (
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build exp_gowebview2loader
|
||||
//go:build windows && exp_gowebview2loader
|
||||
|
||||
package edge
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build !exp_gowebview2loader
|
||||
//go:build windows && !exp_gowebview2loader
|
||||
|
||||
package edge
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package edge
|
||||
|
||||
// This code has been adapted from: https://github.com/go-ole/go-ole
|
||||
@ -47,9 +49,9 @@ type GUID struct {
|
||||
//
|
||||
// The supplied string may be in any of these formats:
|
||||
//
|
||||
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
|
||||
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
|
||||
//
|
||||
// The conversion of the supplied string is not case-sensitive.
|
||||
func NewGUID(guid string) *GUID {
|
||||
@ -155,11 +157,11 @@ func decodeHexChar(c byte) (byte, bool) {
|
||||
|
||||
// String converts the GUID to string form. It will adhere to this pattern:
|
||||
//
|
||||
// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
|
||||
// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
|
||||
//
|
||||
// If the GUID is nil, the string representation of an empty GUID is returned:
|
||||
//
|
||||
// {00000000-0000-0000-0000-000000000000}
|
||||
// {00000000-0000-0000-0000-000000000000}
|
||||
func (guid *GUID) String() string {
|
||||
if guid == nil {
|
||||
return emptyGUID
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build exp_gowebview2loader
|
||||
//go:build windows && exp_gowebview2loader
|
||||
|
||||
package webviewloader
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build exp_gowebview2loader
|
||||
//go:build windows && exp_gowebview2loader
|
||||
|
||||
package webviewloader
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package webviewloader
|
||||
|
||||
import (
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build exp_gowebview2loader
|
||||
//go:build windows && exp_gowebview2loader
|
||||
|
||||
package webviewloader
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//go:build !exp_gowebview2loader
|
||||
//go:build windows && !exp_gowebview2loader
|
||||
|
||||
package webviewloader
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package webviewloader
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package windows
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
package win32
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/windows/registry"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows/registry"
|
||||
)
|
||||
|
||||
type DWMWINDOWATTRIBUTE int32
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package winc
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
@ -411,7 +413,7 @@ func (cba *ControlBase) PreTranslateMessage(msg *w32.MSG) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
//Events
|
||||
// Events
|
||||
func (cba *ControlBase) OnCreate() *EventManager {
|
||||
return &cba.onCreate
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
@ -37,7 +39,7 @@ func (ed *Edit) SetReadOnly(isReadOnly bool) {
|
||||
w32.SendMessage(ed.hwnd, w32.EM_SETREADONLY, uintptr(w32.BoolToBOOL(isReadOnly)), 0)
|
||||
}
|
||||
|
||||
//Public methods
|
||||
// Public methods
|
||||
func (ed *Edit) SetPassword(isPassword bool) {
|
||||
if isPassword {
|
||||
w32.SendMessage(ed.hwnd, w32.EM_SETPASSWORDCHAR, uintptr(passwordChar), 0)
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
@ -11,14 +13,14 @@ import (
|
||||
"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
|
||||
)
|
||||
|
||||
//Private global variables.
|
||||
// Private global variables.
|
||||
var (
|
||||
gAppInstance w32.HINSTANCE
|
||||
gControllerRegistry map[w32.HWND]Controller
|
||||
gRegisteredClasses []string
|
||||
)
|
||||
|
||||
//Public global variables.
|
||||
// Public global variables.
|
||||
var (
|
||||
GeneralWndprocCallBack = syscall.NewCallback(generalWndProc)
|
||||
DefaultFont *Font
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
*/
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
const (
|
||||
@ -1099,7 +1100,7 @@ const (
|
||||
OFN_SHOWHELP = 0x00000010
|
||||
)
|
||||
|
||||
//SHBrowseForFolder flags
|
||||
// SHBrowseForFolder flags
|
||||
const (
|
||||
BIF_RETURNONLYFSDIRS = 0x00000001
|
||||
BIF_DONTGOBELOWDOMAIN = 0x00000002
|
||||
@ -1120,7 +1121,7 @@ const (
|
||||
BIF_BROWSEFILEJUNCTIONS = 0x00010000
|
||||
)
|
||||
|
||||
//MessageBox flags
|
||||
// MessageBox flags
|
||||
const (
|
||||
MB_OK = 0x00000000
|
||||
MB_OKCANCEL = 0x00000001
|
||||
@ -1144,7 +1145,7 @@ const (
|
||||
MB_DEFBUTTON4 = 0x00000300
|
||||
)
|
||||
|
||||
//COM
|
||||
// COM
|
||||
const (
|
||||
E_INVALIDARG = 0x80070057
|
||||
E_OUTOFMEMORY = 0x8007000E
|
||||
|
@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package w32
|
||||
|
||||
import "syscall"
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
|
@ -1,8 +1,9 @@
|
||||
//go:build windows
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 Tad Vizbaras. All Rights Reserved.
|
||||
* Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package w32
|
||||
|
||||
import (
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user