10bbfda8aSnia/*
20bbfda8aSnia * Copyright 2004 Richard Levitte
3645f5050Syouri */
4645f5050Syouri
50bbfda8aSnia#ifndef _CTWM_SESSION_H
60bbfda8aSnia#define _CTWM_SESSION_H
7645f5050Syouri
80bbfda8aSnia#include <stdio.h>  // For FILE
9645f5050Syouri
100bbfda8aSnia#include <X11/SM/SMlib.h>
110bbfda8aSnia
12df1c27a6Snia// Guard
13df1c27a6Snia#ifndef SESSION
14df1c27a6Snia#error "You're unconditionally including session.h!"
15df1c27a6Snia#endif
16df1c27a6Snia
170bbfda8aSnia
180bbfda8aSnia/* Used in stashing session info */
190bbfda8aSniastruct TWMWinConfigEntry {
200bbfda8aSnia	struct TWMWinConfigEntry *next;
210bbfda8aSnia	int tag;
220bbfda8aSnia	char *client_id;
230bbfda8aSnia	char *window_role;
240bbfda8aSnia	XClassHint class;
250bbfda8aSnia	char *wm_name;
260bbfda8aSnia	int wm_command_count;
270bbfda8aSnia	char **wm_command;
280bbfda8aSnia	short x, y;
290bbfda8aSnia	unsigned short width, height;
300bbfda8aSnia	short icon_x, icon_y;
310bbfda8aSnia	bool iconified;
320bbfda8aSnia	bool icon_info_present;
330bbfda8aSnia	bool width_ever_changed_by_user;
340bbfda8aSnia	bool height_ever_changed_by_user;
350bbfda8aSnia	/* ===================[ Matthew McNeill Feb 1997 ]======================= *
360bbfda8aSnia	 * Added this property to facilitate restoration of workspaces when
370bbfda8aSnia	 * restarting a session.
380bbfda8aSnia	 */
390bbfda8aSnia	int occupation;
400bbfda8aSnia	/* ====================================================================== */
41645f5050Syouri
420bbfda8aSnia};
43df1c27a6Sniatypedef struct TWMWinConfigEntry TWMWinConfigEntry;
440bbfda8aSnia
450bbfda8aSnia
460bbfda8aSniavoid ReadWinConfigFile(char *filename);
470bbfda8aSniaint GetWindowConfig(TwmWindow *theWindow,
480bbfda8aSnia                    short *x, short *y,
490bbfda8aSnia                    unsigned short *width, unsigned short *height,
500bbfda8aSnia                    bool *iconified,
510bbfda8aSnia                    bool *icon_info_present,
520bbfda8aSnia                    short *icon_x, short *icon_y,
530bbfda8aSnia                    bool *width_ever_changed_by_user,
540bbfda8aSnia                    bool *height_ever_changed_by_user,
550bbfda8aSnia                    int *occupation /* <== [ Matthew McNeill Feb 1997 ] == */
560bbfda8aSnia                   );
570bbfda8aSniavoid ConnectToSessionManager(char *previous_id);
58df1c27a6Sniavoid shutdown_session(void);
59645f5050Syouri
600bbfda8aSnia#endif /* _CTWM_SESSION_H */
61