~ubuntu-branches/ubuntu/vivid/marco/vivid

« back to all changes in this revision

Viewing changes to src/core/session.h

  • Committer: Package Import Robot
  • Author(s): Mike Gabriel
  • Date: 2014-01-21 19:52:39 UTC
  • Revision ID: package-import@ubuntu.com-20140121195239-c4k1v8umdw1u4n29
Tags: upstream-1.6.2
ImportĀ upstreamĀ versionĀ 1.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
2
 
 
3
/**
 
4
 * \file session.h   Session management
 
5
 *
 
6
 * Maps windows to information about their placing and state on startup.
 
7
 * This is window matching, which we have a policy of leaving in general
 
8
 * to programs such as Devil's Pie, but the session manager specification
 
9
 * requires us to do it here.
 
10
 */
 
11
 
 
12
/* 
 
13
 * Copyright (C) 2001 Havoc Pennington
 
14
 * 
 
15
 * This program is free software; you can redistribute it and/or
 
16
 * modify it under the terms of the GNU General Public License as
 
17
 * published by the Free Software Foundation; either version 2 of the
 
18
 * License, or (at your option) any later version.
 
19
 *
 
20
 * This program is distributed in the hope that it will be useful, but
 
21
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
23
 * General Public License for more details.
 
24
 * 
 
25
 * You should have received a copy of the GNU General Public License
 
26
 * along with this program; if not, write to the Free Software
 
27
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
28
 * 02110-1301, USA.
 
29
 */
 
30
 
 
31
#ifndef META_SESSION_H
 
32
#define META_SESSION_H
 
33
 
 
34
#include "window-private.h"
 
35
 
 
36
typedef struct _MetaWindowSessionInfo MetaWindowSessionInfo;
 
37
 
 
38
struct _MetaWindowSessionInfo
 
39
{
 
40
  /* Fields we use to match against */
 
41
 
 
42
  char *id;
 
43
  char *res_class;
 
44
  char *res_name;
 
45
  char *title;
 
46
  char *role;
 
47
  MetaWindowType type;
 
48
 
 
49
  /* Information we restore */
 
50
  
 
51
  GSList *workspace_indices;  
 
52
 
 
53
  int stack_position;
 
54
  
 
55
  /* width/height should be multiplied by resize inc and
 
56
   * added to base size; position should be interpreted in
 
57
   * light of gravity. This preserves semantics of the
 
58
   * window size/pos, even if fonts/themes change, etc.
 
59
   */
 
60
  int gravity;
 
61
  MetaRectangle rect;
 
62
  MetaRectangle saved_rect;
 
63
  guint on_all_workspaces : 1;
 
64
  guint minimized : 1;
 
65
  guint maximized : 1;
 
66
 
 
67
  guint stack_position_set : 1;
 
68
  guint geometry_set : 1;
 
69
  guint on_all_workspaces_set : 1;
 
70
  guint minimized_set : 1;
 
71
  guint maximized_set : 1;
 
72
  guint saved_rect_set : 1;
 
73
};
 
74
 
 
75
/* If lookup_saved_state returns something, it should be used,
 
76
 * and then released when you're done with it.
 
77
 */
 
78
const MetaWindowSessionInfo* meta_window_lookup_saved_state  (MetaWindow                  *window);
 
79
void                         meta_window_release_saved_state (const MetaWindowSessionInfo *info);
 
80
 
 
81
void meta_session_init (const char *client_id,
 
82
                        const char *save_file);
 
83
 
 
84
 
 
85
void meta_session_shutdown (void);
 
86
 
 
87
#endif
 
88
 
 
89
 
 
90
 
 
91