1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*
* [ ctwm ]
*
* Copyright 2004 Richard Levitte
*
* Permission to use, copy, modify and distribute this software [ctwm] and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting documen-
* tation, and that the name of Claude Lecommandeur not be used in adverti-
* sing or publicity pertaining to distribution of the software without
* specific, written prior permission. Claude Lecommandeur make no represen-
* tations about the suitability of this software for any purpose. It is
* provided "as is" without express or implied warranty.
*
* Claude Lecommandeur DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
* EVENT SHALL Claude Lecommandeur BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* Author: Richard Levitte [ richard@levitte.org ][ June 2004 ]
*/
#include <stdio.h>
#include <X11/SM/SMlib.h>
#include "types.h"
#ifndef _SESSION_
#define _SESSION_
extern SmcConn smcConn;
extern XtInputId iceInputId;
extern char *twm_clientId;
extern TWMWinConfigEntry *winConfigHead;
extern Bool gotFirstSave;
extern Bool sent_save_done;
char *GetClientID(Window window);
char *GetWindowRole(Window window);
int WriteWinConfigEntry(FILE *configFile, TwmWindow *theWindow,
char *clientId, char *windowRole);
int ReadWinConfigEntry(FILE *configFile, unsigned short version,
TWMWinConfigEntry **pentry);
void ReadWinConfigFile(char *filename);
int GetWindowConfig(TwmWindow *theWindow,
short *x, short *y,
unsigned short *width, unsigned short *height,
Bool *iconified,
Bool *icon_info_present,
short *icon_x, short *icon_y,
Bool *width_ever_changed_by_user,
Bool *height_ever_changed_by_user,
int *occupation /* <== [ Matthew McNeill Feb 1997 ] == */
);
void SaveYourselfPhase2CB(SmcConn smcCon, SmPointer clientData);
void SaveYourselfCB(SmcConn smcCon, SmPointer clientData,
int saveType, Bool shutdown,
int interactStyle, Bool fast);
void DieCB(SmcConn smcCon, SmPointer clientData);
void SaveCompleteCB(SmcConn smcCon, SmPointer clientData);
void ShutdownCancelledCB(SmcConn smcCon, SmPointer clientData);
void ProcessIceMsgProc(XtPointer client_data, int *source, XtInputId *id);
void ConnectToSessionManager(char *previous_id);
#endif /* _SESSION_ */
|