1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
4
* \file session.h Session management
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.
13
* Copyright (C) 2001 Havoc Pennington
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.
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.
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
31
#ifndef META_SESSION_H
32
#define META_SESSION_H
34
#include "window-private.h"
36
typedef struct _MetaWindowSessionInfo MetaWindowSessionInfo;
38
struct _MetaWindowSessionInfo
40
/* Fields we use to match against */
49
/* Information we restore */
51
GSList *workspace_indices;
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.
62
MetaRectangle saved_rect;
63
guint on_all_workspaces : 1;
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;
75
/* If lookup_saved_state returns something, it should be used,
76
* and then released when you're done with it.
78
const MetaWindowSessionInfo* meta_window_lookup_saved_state (MetaWindow *window);
79
void meta_window_release_saved_state (const MetaWindowSessionInfo *info);
81
void meta_session_init (const char *client_id,
82
const char *save_file);
85
void meta_session_shutdown (void);