File: migrating-smclient-GtkApplication.xml

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 (48 lines) | stat: -rw-r--r-- 2,010 bytes parent folder | download | duplicates (8)
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
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<chapter id="gtk-migrating-smclient-GtkApplication">

  <title>Migrating from EggSMClient to GtkApplication</title>

  <para>
    EggSMClient provides 'session management' support for applications.
    This means a number of things:
    <itemizedlist>
      <listitem>logout notification and negotiation</listitem>
      <listitem>application state saving</listitem>
      <listitem>restarting of applications with saved state</listitem>
    </itemizedlist>
    EggSMClient supports this functionality to varying degrees on
    Windows and OS X, as well as with XSMP and D-Bus based session
    managers in X11.
  </para>

  <para>
    Starting with GTK+ 3.4, #GtkApplication supports logout notification
    and negotiation similar to EggSMClient.
  </para>
  <table>
    <tgroup cols="2">
      <title>EggSMClient to GtkApplication</title>
      <thead>
        <row><entry>EggSMClient</entry><entry>GtkApplication</entry></row>
      </thead>
      <tbody>
        <row><entry>EggSMClient::quit-requested</entry><entry>instead of calling will_quit (FALSE,...) in response to this signal, install an inhibitor</entry></row>
        <row><entry>EggSMClient::quit</entry><entry>the #GApplication::shutdown signal</entry></row>
        <row><entry>EggSMClient::quit-cancelled</entry><entry>-</entry></row>
        <row><entry>egg_sm_client_will_quit</entry><entry>instead of calling will_quit (FALSE,...), install an inhibitor</entry></row>
        <row><entry>egg_sm_client_end_session</entry><entry>-</entry></row>
      </tbody>
    </tgroup>
  </table>

  <para>
    At this point, GtkApplication has no special support for state saving
    and restarting. Applications can use GSettings or GKeyFile and save as
    much state as they see fit in response to #GApplication::shutdown or
    whenever they consider appropriate.
  </para>
</chapter>