File: gtk-broadway.html

package info (click to toggle)
gtk%2B3.0 3.22.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 182,828 kB
  • ctags: 82,378
  • sloc: ansic: 1,165,043; xml: 9,259; makefile: 6,914; sh: 5,179; python: 402; perl: 370; cpp: 34; sed: 16
file content (85 lines) | stat: -rw-r--r-- 3,684 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Using GTK+ with Broadway: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="platform-support.html" title="Part VII. GTK+ Platform Support">
<link rel="prev" href="gtk-osx.html" title="Using GTK+ on Mac OS X">
<link rel="next" href="gtk-wayland.html" title="Using GTK+ with Wayland">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="platform-support.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk-osx.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk-wayland.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gtk-broadway"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Using GTK+ with Broadway</span></h2>
<p>Using GTK+ with Broadway — 
HTML-specific aspects of using GTK+
</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id-1.8.8.3"></a><h2>Using GTK+ with Broadway</h2>
<p>
The GDK Broadway backend provides support for displaying GTK+
applications in a web browser, using HTML5 and web sockets. To run
your application in this way, select the Broadway backend by setting
<code class="literal">GDK_BACKEND=broadway</code>. Then you can make
your application appear in a web browser by pointing it at
<code class="literal">http://127.0.0.1:8080</code>. Note that you need
to enable web sockets in your web browser.
</p>
<p>
You can choose a different port from the default 8080 by setting
the <code class="envar">BROADWAY_DISPLAY</code> environment variable to the
port that you want to use.
</p>
<p>
It is also possible to use multiple GTK+ applications in the same
web browser window, by using the Broadway server,
<span class="command"><strong>broadwayd</strong></span>, that ships with GTK+.
To use broadwayd, start it like this:
</p>
<pre class="programlisting">
broadwayd :5
</pre>
<p>
Then point your web browser at <code class="literal">http://127.0.0.1:8085</code>.
Start your applications like this:
</p>
<pre class="programlisting">
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk3-demo
</pre>
<p>
</p>
<div class="refsect2">
<a name="broadway-envar"></a><h3>Broadway-specific environment variables</h3>
</div>
<p><b><code class="envar">BROADWAY_DISPLAY</code>. </b>
      Specifies the Broadway display number. The default display is 0.
      The display number determines the port to use when connecting
      to a Broadway application via the following formula:
      </p>
<pre class="programlisting">
        <em class="replaceable"><code>port</code></em> = 8080 + <em class="replaceable"><code>display</code></em>
      </pre>
<p>
    </p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>