2012-03-11 04:48:03 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
]>
|
|
|
|
<refentry id="gtk-broadway">
|
|
|
|
<refmeta>
|
2013-01-24 11:23:04 +00:00
|
|
|
<refentrytitle>Using GTK+ with Broadway</refentrytitle>
|
2012-03-11 04:48:03 +00:00
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>GTK Library</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
2013-01-24 11:23:04 +00:00
|
|
|
<refname>Using GTK+ with Broadway</refname>
|
2012-03-11 04:48:03 +00:00
|
|
|
<refpurpose>
|
|
|
|
HTML-specific aspects of using GTK+
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
2013-01-24 11:23:04 +00:00
|
|
|
<title>Using GTK+ with Broadway</title>
|
2012-03-11 04:48:03 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
The GDK Broadway backend provides support for displaying GTK+
|
2013-01-24 11:23:04 +00:00
|
|
|
applications in a web browser, using HTML5 and web sockets. To run
|
|
|
|
your application in this way, select the Broadway backend by setting
|
2012-03-11 04:48:03 +00:00
|
|
|
<literal>GDK_BACKEND=broadway</literal>. Then you can make
|
|
|
|
your application appear in a web browser by pointing it at
|
|
|
|
<literal>http://127.0.0.1:8080</literal>. Note that you need
|
|
|
|
to enable web sockets in your web browser.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
You can choose a different port from the default 8080 by setting
|
|
|
|
the <envar>BROADWAY_DISPLAY</envar> environment variable to the
|
|
|
|
port that you want to use.
|
|
|
|
</para>
|
|
|
|
|
2013-01-24 11:23:04 +00:00
|
|
|
<para>
|
|
|
|
It is also possible to use multiple GTK+ applications in the same
|
|
|
|
web browser window, by using the Broadway server,
|
|
|
|
<command>broadwayd</command>, that ships with GTK+.
|
|
|
|
To use broadwayd, start it like this:
|
|
|
|
<programlisting>
|
|
|
|
broadwayd :5
|
|
|
|
</programlisting>
|
|
|
|
Then point your web browser at <literal>http://127.0.0.1:8084</literal>.
|
|
|
|
Start your applications like this:
|
|
|
|
<programlisting>
|
|
|
|
BROADWAY_DISPLAY=:5 gtk3-demo
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<refsect2 id="broadway-envar">
|
|
|
|
<title>Broadway-specific environment variables</title>
|
|
|
|
|
|
|
|
</refsect2>
|
|
|
|
<formalpara>
|
|
|
|
<title><envar>BROADWAY_DISPLAY</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Specifies the Broadway display number. The default display is 1.
|
|
|
|
The display number determines the port to use when connecting
|
|
|
|
to a Broadway application via the following formula:
|
|
|
|
<programlisting>
|
|
|
|
<replaceable>port</replaceable> = 8080 + (<replaceable>display</replaceable> - 1)
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</formalpara>
|
2012-03-11 04:48:03 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|