[gtkmm-documentation] Remove the "Plugs and Sockets" chapter and example
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Remove the "Plugs and Sockets" chapter and example
- Date: Thu, 17 Nov 2016 11:54:13 +0000 (UTC)
commit 2c11fad94458d4e72998e13aa1de8d7f742ce74b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Nov 17 12:51:15 2016 +0100
Remove the "Plugs and Sockets" chapter and example
The Gtk::Plug and Gtk::Socket classes have been removed from gtkmm 4 (and
GtkPlug and GtkSocket from gtk+ 4). Remove the Plug and Socket example and
the "Plugs and Sockets" chapter.
docs/tutorial/C/figures/socket-fail.png | Bin 4632 -> 0 bytes
docs/tutorial/C/figures/socket.png | Bin 3847 -> 0 bytes
docs/tutorial/C/index-in.docbook | 151 -------------------------------
docs/tutorial/Makefile.am | 2 -
examples/Makefile.am | 8 --
examples/book/socket/plug.cc | 53 -----------
examples/book/socket/socket.cc | 60 ------------
7 files changed, 0 insertions(+), 274 deletions(-)
---
diff --git a/docs/tutorial/C/index-in.docbook b/docs/tutorial/C/index-in.docbook
index 92b87c0..27619e4 100644
--- a/docs/tutorial/C/index-in.docbook
+++ b/docs/tutorial/C/index-in.docbook
@@ -5765,157 +5765,6 @@ if (info)
</sect1>
</chapter>
-<chapter id="chapter-plugs-sockets">
- <title>Plugs and Sockets</title>
- <sect1 id="sec-plugs-sockets-overview">
- <title>Overview</title>
- <para>
- From time to time, it may be useful to be able to embed a widget from
- another application within your application. >kmm; allows you to do
- this with the <classname>Gtk::Socket</classname> and
- <classname>Gtk::Plug</classname> classes. It is not anticipated that very
- many applications will need this functionality, but in the rare case that
- you need to display a widget that is running in a completely different
- process, these classes can be very helpful.
- </para>
- <para>
- The communication between a <classname>Socket</classname> and a
- <classname>Plug</classname> follows the XEmbed protocol. This protocol has
- also been implemented in other toolkits (e.g. Qt), which allows the same
- level of integration when embedding a Qt widget in GTK+ or vice versa.
- </para>
- <para>
- The way that <classname>Sockets</classname> and
- <classname>Plugs</classname> work together is through their window ids.
- Both a <classname>Socket</classname> and a <classname>Plug</classname>
- have IDs that can be retrieved with their <methodname>get_id()</methodname>
- member functions. The use of these IDs will be explained below in <xref
- linkend="sec-connecting-plugs-sockets"/>.
- </para>
- <sect2 id="sec-sockets">
- <title>Sockets</title>
- <para>
- A <classname>Socket</classname> is a special kind of container widget that
- provides the ability to embed widgets from one process into another
- process in a way that is transparent to the user.
- </para>
- </sect2>
- <sect2 id="sec-plugs">
- <title>Plugs</title>
- <para>
- A <classname>Plug</classname> is a special kind of Window that can be
- plugged into a <classname>Socket</classname>. Besides the normal
- properties and methods of <classname>Gtk::Window</classname>, a
- <classname>Plug</classname> provides a constructor that takes the ID of
- a <classname>Socket</classname>, which will automatically embed the
- <classname>Plug</classname> into the <classname>Socket</classname> that
- matches that ID.
- </para>
- <para>
- Since a <classname>Plug</classname> is just a special type of
- <classname>Gtk::Window</classname> class, you can add containers or
- widgets to it like you would to any other window.
- </para>
- </sect2>
- <sect2 id="sec-connecting-plugs-sockets">
- <title>Connecting Plugs and Sockets</title>
- <para>
- After a <classname>Socket</classname> or <classname>Plug</classname>
- object is realized, you can obtain its ID with its
- <methodname>get_id()</methodname> function. This ID can then be shared with
- other processes so that other processes know how to connect to
- each other.
- </para>
- <para>
- There are two basic strategies that can be used:
- <itemizedlist>
- <listitem>
- <para>
- Create a <classname>Socket</classname> object in one process and
- pass the ID of that <classname>Socket</classname> to another
- process so that it can create a <classname>Plug</classname> object
- by specifying the given <classname>Socket</classname> ID in its
- constructor. There is no way to assign a
- <classname>Plug</classname> to a particular
- <classname>Socket</classname> after creation, so you must pass the
- <classname>Socket</classname> ID to the
- <classname>Plug</classname>'s constructor.
- </para>
- </listitem>
- <listitem>
- <para>
- Create a <classname>Plug</classname> independantly from any
- particular <classname>Socket</classname> and pass the ID of the
- <classname>Plug</classname> to other processes that need to use
- it. The ID of the <classname>Plug</classname> can be associated
- with a particular <classname>Socket</classname> object using the
- <methodname>Socket::add_id()</methodname> function. This is the
- approach used in the example below.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
- </sect1>
- <sect1 id="sec-plugs-sockets-example">
- <title>Plugs and Sockets Example</title>
- <para>
- The following is a simple example of using sockets and plugs. The method
- of communication between processes is deliberately kept very simple: The
- <classname>Plug</classname> writes its ID out to a text file named
- <filename>plug.id</filename> and the process with the socket reads the ID
- from this file. In a real program, you may want to use a more
- sophisticated method of inter-process communication.
- </para>
- <para><ulink url="&url_examples_base;socket/">Source Code</ulink></para>
- <para>
- This example creates two executable programs: <filename>socket</filename>
- and <filename>plug</filename>. The idea is that
- <filename>socket</filename> has an application window that will embed a
- widget from the <filename>plug</filename> program. The way this example
- is designed, <filename>plug</filename> must be running first before
- starting <filename>socket</filename>. To see the example in action,
- execute the following commands in order from within the example directory:
- </para>
- <para>
- Start the <filename>plug</filename> program and send it to the background
- (or just use a different terminal).
- </para>
- <screen>$ ./plug &</screen>
- <para>
- After which you should see something like the following:
- </para>
- <screen>The window ID is: 69206019</screen>
- <para>Then start the <filename>socket</filename> program:</para>
- <screen>$ ./socket</screen>
- <para>
- After starting <filename>socket</filename>, you should see the following
- output in the terminal:
- </para>
- <screen>I've been embedded.
-A plug was added</screen>
- <para>
- The first line of output is from <filename>plug</filename>, after it has
- been notified that it has been embedded inside of a
- <classname>Socket</classname>. The second line was emitted by
- <filename>socket</filename> in response to its
- <methodname>plug_added</methodname> signal. If everything was done as
- described above, the <filename>socket</filename> window should look
- roughly like the following:
- </para>
- <screenshot>
- <graphic format="PNG" fileref="&url_figures_base;socket.png"/>
- </screenshot>
- <para>
- If for some reason the <classname>Socket</classname> couldn't attach the
- <classname>Plug</classname>, the window would look something like this:
- </para>
- <screenshot>
- <graphic format="PNG" fileref="&url_figures_base;socket-fail.png"/>
- </screenshot>
- </sect1>
-</chapter>
-
<chapter id="chapter-keyboardevents">
<title>Keyboard Events</title>
<para>
diff --git a/docs/tutorial/Makefile.am b/docs/tutorial/Makefile.am
index c16e594..36b9135 100644
--- a/docs/tutorial/Makefile.am
+++ b/docs/tutorial/Makefile.am
@@ -97,8 +97,6 @@ HELP_MEDIA = \
figures/range_widgets.png \
figures/recentchooserdialog.png \
figures/scrolledwindow.png \
- figures/socket-fail.png \
- figures/socket.png \
figures/spinbutton.png \
figures/textview.png \
figures/toolbar.png \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index a34dc70..3043201 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -97,8 +97,6 @@ check_PROGRAMS = \
book/scrolledwindow/example \
book/searchbar/example \
book/signals/custom/example \
- book/socket/plug \
- book/socket/socket \
book/spinbutton/example \
book/textview/example \
book/timeout/timeout \
@@ -615,12 +613,6 @@ book_signals_custom_example_SOURCES = \
book/signals/custom/server.cc \
book/signals/custom/server.h
-book_socket_plug_SOURCES = \
- book/socket/plug.cc
-
-book_socket_socket_SOURCES = \
- book/socket/socket.cc
-
book_spinbutton_example_SOURCES = \
book/spinbutton/examplewindow.cc \
book/spinbutton/examplewindow.h \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]