-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathProgram.fs
More file actions
35 lines (29 loc) · 1.04 KB
/
Program.fs
File metadata and controls
35 lines (29 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
open System.Threading
open Examples.SharedCode
open Gtk
open Interstellar
open Interstellar.GtkSharp.Webkit
open WebKit
module Main =
let runApp () =
let mainCtx = SynchronizationContext.Current
Async.Start <| async {
let onMainWindowCreated (w: IBrowserWindow<Window>) =
let nativeWindow = w.NativeWindow
// This is where you could call some GTK-specific APIs on this window
()
do! BrowserApp.runAsync mainCtx (SimpleBrowserApp.app onMainWindowCreated)
Application.Quit ()
}
[<EntryPoint>]
let main argv =
Application.Init ()
// let wv = new WebView(WidthRequest = 400, HeightRequest = 100, Hexpand = true)
// let window = new Window("WebView Sample")
// window.Add wv
// wv.LoadUri "https://en.wikipedia.org/"
// window.DeleteEvent.Add (fun _ -> Application.Quit ())
// window.ShowAll ()
runApp ()
Application.Run ()
0