26
27
from The Open Group.
29
/* $XFree86: xc/programs/xdm/greeter/LoginP.h,v 3.7 2001/01/17 23:45:25 dawes Exp $ */
30
/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
32
* Permission is hereby granted, free of charge, to any person obtaining a
33
* copy of this software and associated documentation files (the
34
* "Software"), to deal in the Software without restriction, including
35
* without limitation the rights to use, copy, modify, merge, publish,
36
* distribute, and/or sell copies of the Software, and to permit persons
37
* to whom the Software is furnished to do so, provided that the above
38
* copyright notice(s) and this permission notice appear in all copies of
39
* the Software and that both the above copyright notice(s) and this
40
* permission notice appear in supporting documentation.
42
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
43
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
45
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
46
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
47
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
48
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
49
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
50
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
52
* Except as contained in this notice, the name of a copyright holder
53
* shall not be used in advertising or otherwise to promote the sale, use
54
* or other dealings in this Software without prior written authorization
55
* of the copyright holder.
57
/* $XFree86: xc/programs/xdm/greeter/LoginP.h,v 3.8 2001/12/14 20:01:29 dawes Exp $ */
32
60
* xdm - display manager daemon
68
#include <X11/IntrinsicP.h>
40
69
#include <X11/CoreP.h>
42
70
#include <X11/Xlib.h>
72
# include <X11/Xft/Xft.h>
75
#define INITIALIZING 0
77
#define SHOW_MESSAGE 2
49
80
typedef void (*LoginFunc)(LoginWidget, LoginData *, int);
83
char * promptText; /* Prompt displayed */
84
const char * defaultPrompt; /* Default text for prompt */
85
char * valueText; /* Value entered for prompt */
86
size_t valueTextMax; /* Size of valueText buffer */
87
int valueShownStart;/* Amount of string shown if too */
88
int valueShownEnd; /* long to fit in field */
89
int cursor; /* current cursor position */
90
loginPromptState state;
93
#define NUM_PROMPTS 2 /* Currently only 2 prompt fields supported */
94
#define LAST_PROMPT (NUM_PROMPTS - 1)
51
96
/* New fields for the login widget instance record */
53
99
Pixel textpixel; /* foreground pixel */
54
100
Pixel promptpixel; /* prompt pixel */
55
101
Pixel greetpixel; /* greeting pixel */
56
102
Pixel failpixel; /* failure pixel */
58
104
Pixel hipixel; /* frame hilite pixel */
59
105
Pixel shdpixel; /* shadow frame pixel */
61
106
GC textGC; /* pointer to GraphicsContext */
62
107
GC bgGC; /* pointer to GraphicsContext */
63
108
GC xorGC; /* pointer to GraphicsContext */
68
114
GC hiGC; /* for hilight part of frame */
69
115
GC shdGC; /* for shaded part of frame */
71
116
char *greeting; /* greeting */
72
117
char *unsecure_greet;/* message displayed when insecure */
73
118
char *namePrompt; /* name prompt */
74
119
char *passwdPrompt; /* password prompt */
75
char *fail; /* failure message */
76
XFontStruct *font; /* font for text */
120
char *failMsg; /* failure message */
121
char *fail; /* current error message */
122
char *passwdChangeMsg; /* message when passwd expires */
124
XFontStruct *textFont; /* font for text */
77
125
XFontStruct *promptFont; /* font for prompts */
78
126
XFontStruct *greetFont; /* font for greeting */
79
127
XFontStruct *failFont; /* font for failure message */
80
129
int state; /* state */
81
int cursor; /* current cursor position */
130
int activePrompt; /* which prompt is active */
82
131
int failUp; /* failure message displayed */
83
132
LoginData data; /* name/passwd */
84
133
char *sessionArg; /* argument passed to session */
90
139
Boolean allow_null_passwd; /* allow null password on login */
91
140
Boolean allow_root_login; /* allow root login */
92
141
XIC xic; /* input method of input context */
142
loginPromptData prompts[NUM_PROMPTS];
97
151
int outframewidth; /* outer frame thickness */
98
152
int inframeswidth; /* inner frames thickness */
99
153
int sepwidth; /* width of separator line */
101
156
char *logoFileName;
102
157
unsigned int logoWidth, logoHeight, logoPadding, logoBorderWidth;
103
158
int logoX, logoY;
105
160
Boolean useShape, logoValid;
106
161
Pixmap logoPixmap, logoMask;
165
XftFont *textFace; /* font for text */
166
XftFont *promptFace; /* font for prompts */
167
XftFont *greetFace; /* font for greeting */
168
XftFont *failFace; /* font for failure message */
169
XftColor textcolor; /* foreground color */
170
XftColor promptcolor; /* prompt color */
171
XftColor greetcolor; /* greeting color */
172
XftColor failcolor; /* failure color */
110
176
/* Full instance record declaration */