~ctwm/ctwm/trunk

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