~ctwm/ctwm/trunk

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
/*
 * Copyright 2004 Richard Levitte
 */

#ifndef _CTWM_SESSION_H
#define _CTWM_SESSION_H

#include <stdio.h>  // For FILE

#include <X11/SM/SMlib.h>

/* XXX Only used in one place, should convert to a func? */
extern SmcConn smcConn;

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 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 /* _CTWM_SESSION_H */