session.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00012 /* 
00013  * Copyright (C) 2001 Havoc Pennington
00014  * 
00015  * This program is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU General Public License as
00017  * published by the Free Software Foundation; either version 2 of the
00018  * License, or (at your option) any later version.
00019  *
00020  * This program is distributed in the hope that it will be useful, but
00021  * WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * General Public License for more details.
00024  * 
00025  * You should have received a copy of the GNU General Public License
00026  * along with this program; if not, write to the Free Software
00027  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00028  * 02111-1307, USA.
00029  */
00030 
00031 #ifndef META_SESSION_H
00032 #define META_SESSION_H
00033 
00034 #include "window-private.h"
00035 
00036 typedef struct _MetaWindowSessionInfo MetaWindowSessionInfo;
00037 
00038 struct _MetaWindowSessionInfo
00039 {
00040   /* Fields we use to match against */
00041 
00042   char *id;
00043   char *res_class;
00044   char *res_name;
00045   char *title;
00046   char *role;
00047   MetaWindowType type;
00048 
00049   /* Information we restore */
00050   
00051   GSList *workspace_indices;  
00052 
00053   int stack_position;
00054   
00055   /* width/height should be multiplied by resize inc and
00056    * added to base size; position should be interpreted in
00057    * light of gravity. This preserves semantics of the
00058    * window size/pos, even if fonts/themes change, etc.
00059    */
00060   int gravity;
00061   MetaRectangle rect;
00062   MetaRectangle saved_rect;
00063   guint on_all_workspaces : 1;
00064   guint minimized : 1;
00065   guint maximized : 1;
00066 
00067   guint stack_position_set : 1;
00068   guint geometry_set : 1;
00069   guint on_all_workspaces_set : 1;
00070   guint minimized_set : 1;
00071   guint maximized_set : 1;
00072   guint saved_rect_set : 1;
00073 };
00074 
00075 /* If lookup_saved_state returns something, it should be used,
00076  * and then released when you're done with it.
00077  */
00078 const MetaWindowSessionInfo* meta_window_lookup_saved_state  (MetaWindow                  *window);
00079 void                         meta_window_release_saved_state (const MetaWindowSessionInfo *info);
00080 
00081 void meta_session_init (const char *client_id,
00082                         const char *save_file);
00083 
00084 
00085 void meta_session_shutdown (void);
00086 
00087 #endif
00088 
00089 
00090 
00091 

Generated on Sat Aug 23 22:04:17 2008 for metacity by  doxygen 1.5.5