-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
46 additions
and
47 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
import objc_runtime | ||
|
||
type | ||
Webview* = ptr WebviewObj | ||
WebviewObj* {.pure.} = object ## WebView Type | ||
url* : string ## Current URL | ||
title* : string ## Window Title | ||
width* : int ## Window Width | ||
height* : int ## Window Height | ||
resizable* : bool ## `true` to Resize the Window, `false` for Fixed size Window | ||
debug* : bool ## Debug is `true` when not build for Release | ||
invokeCb* : pointer ## Callback proc js:window.external.invoke | ||
priv* : WebviewPrivObj | ||
userdata* : pointer | ||
onOpenFile*: OnOpenFile | ||
|
||
WebviewPrivObj* = object | ||
pool*: ID | ||
window*: ID | ||
webview*: ID | ||
windowDelegate*: ID | ||
|
||
OnOpenFile* = proc (w: Webview; filePath: string; name = ""):bool | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import std/[locks, tables] | ||
import winim | ||
import types | ||
import crowngui/types | ||
|
||
type | ||
WebviewContextStoreObj = object | ||
|
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 |
---|---|---|
@@ -1,3 +1,23 @@ | ||
when defined(windows): | ||
import ./platforms/win/webview2/types | ||
elif defined(macosx): | ||
import ./platforms/macos/types | ||
|
||
type | ||
WebView* = ptr WebViewObj | ||
WebViewObj* = object | ||
url* : string | ||
title* : string | ||
width* : int | ||
height* : int | ||
resizable*: bool | ||
debug* : bool | ||
invokeCb* : pointer | ||
priv*: WebviewPrivObj | ||
created*: bool | ||
onOpenFile*: OnOpenFile | ||
entryType*: EntryType | ||
EntryType* = enum | ||
url, file, html, dir | ||
url, file, html, dir | ||
OnOpenFile* = proc (w: Webview; filePath: string; name = ""):bool | ||
|
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