-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor to break Run into register and native loop
- Loading branch information
Showing
9 changed files
with
82 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//+build !windows | ||
|
||
package main | ||
|
||
func showWebviewOnWindows() { | ||
panic("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/lxn/walk" | ||
) | ||
|
||
func showWebviewOnWindows() { | ||
mainWindow, err := walk.NewMainWindow() | ||
if err != nil { | ||
panic(fmt.Sprintf("Failed to create main window: %v\n", err)) | ||
} | ||
mainWindow.SetTitle("Webview") | ||
mainWindow.SetWidth(800) | ||
mainWindow.SetHeight(600) | ||
layout := walk.NewVBoxLayout() | ||
if err := mainWindow.SetLayout(layout); err != nil { | ||
panic(fmt.Sprintf("Failed to set layout: %v\n", err)) | ||
} | ||
webView, err := walk.NewWebView(mainWindow) | ||
if err != nil { | ||
panic(fmt.Sprintf("Failed to create webview window: %v\n", err)) | ||
} | ||
webView.SetURL("https://www.getlantern.org") | ||
mainWindow.SetVisible(true) | ||
mainWindow.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters