1/*
2
3KDE Greeter module for xdm
4
5Copyright (C) 2001-2003 Oswald Buddenhagen <ossi@kde.org>
6
7This file contains code from the old xdm core,
8Copyright 1988, 1998 Keith Packard, MIT X Consortium/The Open Group
9
10This program is free software; you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation; either version 2 of the License, or
13(at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
24*/
25
26#ifndef _KDM_GREET_H_
27#define _KDM_GREET_H_
28
29#include <greet.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35void gSet(int master);
36void gSendInt(int val);
37void gSendStr(const char *buf);
38/*void gSendNStr(const char *buf, int len);*/
39void gSendArr(int len, const char *buf);
40int gRecvInt(void);
41char *gRecvStr(void);
42char **gRecvStrArr(int *len);
43char *gRecvArr(int *len);
44
45int getCfgInt(int id);
46char *getCfgStr(int id);
47char **getCfgStrArr(int id, int *len);
48
49void freeStrArr(char **arr);
50
51extern int debugLevel;
52void debug(const char *fmt, ...);
53void logInfo(const char *fmt, ...);
54void logWarn(const char *fmt, ...);
55void logError(const char *fmt, ...);
56void logPanic(const char *fmt, ...) ATTR_NORETURN;
57
58struct _XDisplay;
59
60void secureKeyboard(struct _XDisplay *dpy);
61void securePointer(struct _XDisplay *dpy);
62void secureInputs(struct _XDisplay *dpy);
63void unsecureInputs(struct _XDisplay *dpy);
64void secureDisplay(struct _XDisplay *dpy);
65void unsecureDisplay(struct _XDisplay *dpy);
66int pingServer(struct _XDisplay *dpy);
67
68void setupModifiers(struct _XDisplay *mdpy, int numlock);
69void restoreModifiers(void);
70
71void setCursor(struct _XDisplay *mdpy, int window, int shape);
72
73
74extern int rfd; /* for select() loops */
75extern int mrfd, mwfd, srfd, swfd; /* for main */
76
77extern char *dname; /* d->name */
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* _KDM_GREET_H_ */
84