~ubuntu-branches/ubuntu/vivid/gnome-session/vivid

« back to all changes in this revision

Viewing changes to egg/eggsmclient.h

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-10-31 09:19:52 UTC
  • mfrom: (1.1.86) (245.1.1 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141031091952-ci78rlfuztpd0y47
Tags: 3.14.0-2ubuntu1
* Merge from Debian, Remaining Changes:
  - debian/control.in: 
    + Recommend session-migration
    * don't depend on xwayland
  - debian/gnome-session.install: Don't install wayland session for now
    since its not yet possible to run it
  - Split ubuntu-session out of gnome-session.
  - Add upstart user session
  - debian/gnome-session-bin.postinst, debian/gnome-session-bin.prerm:
     Moved registering gnome-session binary as a session manager to 
     gnome-session-bin package
  - don't install defaults.list (installed by desktop-file-utils in ubuntu):
     debian/gnome-session-common.dirs and gnome-session-common.install
 - debian/patches/22_support_autostart_delay.patch:
    Bugzilla patch to support adding a delay to autostart apps, using
    a "X-GNOME-Autostart-Delay" key in the desktop file
 - debian/patches/50_ubuntu_sessions.patch:
    + Add Ubuntu session
    + gnome-shell.desktop adds --session=gnome now that the "ubuntu" session
      is the default. Use TryExec to test if gnome-shell is installed.
 - debian/patches/51_remove_session_saving_from_gui.patch:
    add GNOME_SESSION_SAVE environment variable for people wanting to
    use the save session still, knowing that it can break your system
    if used unwisely (LP: #771896)
 - debian/patches/52_xdg_current_desktop.patch:
    Set XDG_CURRENT_DESKTOP inside gnome-session based on a
    new key 'DesktopName' in gnome-session .desktop files.
 - debian/patches/53_add_sessionmigration.patch, debian/control:
    recommends and launch the session-migration if present at the start
    of the session. This sync tool is running different session migration
    scripts that can be provided in various desktop packages.
 - debian/patches/95_dbus_request_shutdown.patch:
    Add "RequestShutdown" and "RequestReboot" DBus methods to allow other
    applications to shutdown or reboot the machine via the session manager.
  - debian/patches/103_kill_the_fail_whale.patch:
    Kill the Fail Whale as it tends to be more annoying than helpful
* debian/patches/revert_remove_gnome_session_properties.patch
* Dropped Changes:
* debian/patches/52_xdg_current_desktop.patch: Dropped Upsream includes a
  fallback to set this now. 
* Remove patches that have been disabled since 3.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* eggsmclient.h
2
 
 * Copyright (C) 2007 Novell, Inc.
3
 
 *
4
 
 * This library is free software; you can redistribute it and/or
5
 
 * modify it under the terms of the GNU Lesser General Public
6
 
 * License as published by the Free Software Foundation; either
7
 
 * version 2 of the License, or (at your option) any later version.
8
 
 *
9
 
 * This library is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
 * Lesser General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU Lesser General Public
15
 
 * License along with this library; if not, write to the
16
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
 
 * Boston, MA 02111-1307, USA.
18
 
 */
19
 
 
20
 
#ifndef __EGG_SM_CLIENT_H__
21
 
#define __EGG_SM_CLIENT_H__
22
 
 
23
 
#include <glib-object.h>
24
 
 
25
 
G_BEGIN_DECLS
26
 
 
27
 
#define EGG_TYPE_SM_CLIENT            (egg_sm_client_get_type ())
28
 
#define EGG_SM_CLIENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT, EggSMClient))
29
 
#define EGG_SM_CLIENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT, EggSMClientClass))
30
 
#define EGG_IS_SM_CLIENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_SM_CLIENT))
31
 
#define EGG_IS_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_SM_CLIENT))
32
 
#define EGG_SM_CLIENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_SM_CLIENT, EggSMClientClass))
33
 
 
34
 
typedef struct _EggSMClient        EggSMClient;
35
 
typedef struct _EggSMClientClass   EggSMClientClass;
36
 
typedef struct _EggSMClientPrivate EggSMClientPrivate;
37
 
 
38
 
typedef enum {
39
 
  EGG_SM_CLIENT_END_SESSION_DEFAULT,
40
 
  EGG_SM_CLIENT_LOGOUT,
41
 
  EGG_SM_CLIENT_REBOOT,
42
 
  EGG_SM_CLIENT_SHUTDOWN
43
 
} EggSMClientEndStyle;
44
 
 
45
 
typedef enum {
46
 
  EGG_SM_CLIENT_MODE_DISABLED,
47
 
  EGG_SM_CLIENT_MODE_NO_RESTART,
48
 
  EGG_SM_CLIENT_MODE_NORMAL
49
 
} EggSMClientMode;
50
 
 
51
 
struct _EggSMClient
52
 
{
53
 
  GObject parent;
54
 
 
55
 
};
56
 
 
57
 
struct _EggSMClientClass
58
 
{
59
 
  GObjectClass parent_class;
60
 
 
61
 
  /* signals */
62
 
  void (*save_state)       (EggSMClient *client,
63
 
                            GKeyFile    *state_file);
64
 
 
65
 
  void (*quit_requested)   (EggSMClient *client);
66
 
  void (*quit_cancelled)   (EggSMClient *client);
67
 
  void (*quit)             (EggSMClient *client);
68
 
 
69
 
  /* virtual methods */
70
 
  void     (*startup)             (EggSMClient          *client,
71
 
                                   const char           *client_id);
72
 
  void     (*set_restart_command) (EggSMClient          *client,
73
 
                                   int                   argc,
74
 
                                   const char          **argv);
75
 
  void     (*will_quit)           (EggSMClient          *client,
76
 
                                   gboolean              will_quit);
77
 
  gboolean (*end_session)         (EggSMClient          *client,
78
 
                                   EggSMClientEndStyle   style,
79
 
                                   gboolean              request_confirmation);
80
 
 
81
 
  /* Padding for future expansion */
82
 
  void (*_egg_reserved1) (void);
83
 
  void (*_egg_reserved2) (void);
84
 
  void (*_egg_reserved3) (void);
85
 
  void (*_egg_reserved4) (void);
86
 
};
87
 
 
88
 
GType            egg_sm_client_get_type            (void) G_GNUC_CONST;
89
 
 
90
 
GOptionGroup    *egg_sm_client_get_option_group    (void);
91
 
 
92
 
/* Initialization */
93
 
void             egg_sm_client_set_mode            (EggSMClientMode mode);
94
 
EggSMClientMode  egg_sm_client_get_mode            (void);
95
 
EggSMClient     *egg_sm_client_get                 (void);
96
 
 
97
 
/* Resuming a saved session */
98
 
gboolean         egg_sm_client_is_resumed          (EggSMClient *client);
99
 
GKeyFile        *egg_sm_client_get_state_file      (EggSMClient *client);
100
 
 
101
 
/* Alternate means of saving state */
102
 
void             egg_sm_client_set_restart_command (EggSMClient  *client,
103
 
                                                    int           argc,
104
 
                                                    const char  **argv);
105
 
 
106
 
/* Handling "quit_requested" signal */
107
 
void             egg_sm_client_will_quit           (EggSMClient *client,
108
 
                                                    gboolean     will_quit);
109
 
 
110
 
/* Initiate a logout/reboot/shutdown */
111
 
gboolean         egg_sm_client_end_session         (EggSMClientEndStyle  style,
112
 
                                                    gboolean             request_confirmation);
113
 
 
114
 
G_END_DECLS
115
 
 
116
 
 
117
 
#endif /* __EGG_SM_CLIENT_H__ */