Check-in [b3e75d7de9]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:another update of twv readme (fighting with markdown)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b3e75d7de961e770da1f13293b30548a27384712
User & Date: chw 2019-06-11 09:31:09
Context
2019-06-12
03:17
add some twv demos check-in: 9352a29c3d user: chw tags: trunk
2019-06-11
09:33
merge with trunk check-in: f9cdb3b1bb user: chw tags: wtf-8-experiment
09:31
another update of twv readme (fighting with markdown) check-in: b3e75d7de9 user: chw tags: trunk
09:25
again, update twv readme check-in: d684f731aa user: chw tags: trunk
Changes

Changes to undroid/twv/README.md.

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

Tcl extension that provides API for the [webview] library. Modeled after the Python binding.

## Build instructions

Building on Linux and MacOSX:

```sh
make TCL_CFLAGS="-I... -DUSE_TCL_STUBS" TCL_LDFLAGS="-L... -ltclstub8.6"
```

Building for Windows using MingW cross compiler:

```sh
make TCL_CFLAGS="-I... -DUSE_TCL_STUBS" TCL_LDFLAGS="-L... -ltclstub86" TARGET_OS=Windows_NT
```

## Getting started

Try the following example:

`
package require twv
set W [twv::new -width 800 -heigh 600 -title Hello -resizable 1 -debug 0 -url "https://www.androwish.org"]
$W run
`

You may use most of the webview APIs:

`
# Change window title
$W title "New title"
# Make window fullscreen
$W fullscreen 1
# Change initial window background color
$W color 255 0 0 0
# Evaluate JS
$W eval "alert('hello')"
# Call JS function
$W call alert "Hello World"
# Inject some CSS (needs testing)
$W inject_css "* {background-color: yellow; }"
# Show native OS dialog
set path [$W dialog open "Open File"]
# Post function to the UI thread (needs testing)
$W dispatch {puts "Hello world!"}
# Control run loop, blocking version
while {[$W loop 1]} {
  # do something
}
# Run loop, returns when webview terminated
$W run 
`

[webview]: https://github.com/zserge/webview







<
|
<



<
|
<





<
|
|
|
|
<


<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

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
36
37
38
39
40
41
42
43
44
45
46
47

48

Tcl extension that provides API for the [webview] library. Modeled after the Python binding.

## Build instructions

Building on Linux and MacOSX:


    make TCL_CFLAGS="-I... -DUSE_TCL_STUBS" TCL_LDFLAGS="-L... -ltclstub8.6"


Building for Windows using MingW cross compiler:


    make TCL_CFLAGS="-I... -DUSE_TCL_STUBS" TCL_LDFLAGS="-L... -ltclstub86" TARGET_OS=Windows_NT


## Getting started

Try the following example:


    package require twv
    set W [twv::new -width 800 -heigh 600 -title Hello -resizable 1 -debug 0 -url "https://www.androwish.org"]
    $W run


You may use most of the webview APIs:


    # Change window title
    $W title "New title"
    # Make window fullscreen
    $W fullscreen 1
    # Change initial window background color
    $W color 255 0 0 0
    # Evaluate JS
    $W eval "alert('hello')"
    # Call JS function
    $W call alert "Hello World"
    # Inject some CSS (needs testing)
    $W inject_css "* {background-color: yellow; }"
    # Show native OS dialog
    set path [$W dialog open "Open File"]
    # Post function to the UI thread (needs testing)
    $W dispatch {puts "Hello world!"}
    # Control run loop, blocking version
    while {[$W loop 1]} {
      # do something
    }
    # Run loop, returns when webview terminated
    $W run 


[webview]: https://github.com/zserge/webview