~ubuntu-branches/ubuntu/precise/xdm/precise

« back to all changes in this revision

Viewing changes to greeter/LoginP.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2008-10-05 20:55:43 UTC
  • mfrom: (7.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081005205543-t9lgih96kbj1eidd
Tags: 1:1.1.8-5
Updated Polish debconf translation, thanks to Łukasz Paździora
(closes: #499073).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XdotOrg: $ */
1
2
/* $Xorg: LoginP.h,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
2
3
/*
3
4
 
26
27
from The Open Group.
27
28
 
28
29
*/
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.
 
31
 *
 
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.
 
41
 *
 
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.
 
51
 *
 
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.
 
56
 */
 
57
/* $XFree86: xc/programs/xdm/greeter/LoginP.h,v 3.8 2001/12/14 20:01:29 dawes Exp $ */
30
58
 
31
59
/*
32
60
 * xdm - display manager daemon
37
65
#define _LoginP_h
38
66
 
39
67
#include "Login.h"
 
68
#include <X11/IntrinsicP.h>
40
69
#include <X11/CoreP.h>
41
 
#ifdef XPM
42
70
#include <X11/Xlib.h>
43
 
#endif /* XPM */
 
71
#ifdef USE_XFT
 
72
# include <X11/Xft/Xft.h>
 
73
#endif
44
74
 
45
 
#define GET_NAME        0
46
 
#define GET_PASSWD      1
47
 
#define DONE            2
 
75
#define INITIALIZING    0
 
76
#define PROMPTING       1
 
77
#define SHOW_MESSAGE    2
 
78
#define DONE            3
48
79
 
49
80
typedef void (*LoginFunc)(LoginWidget, LoginData *, int);
50
81
 
 
82
typedef struct {
 
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;
 
91
} loginPromptData;
 
92
 
 
93
#define NUM_PROMPTS     2       /* Currently only 2 prompt fields supported */
 
94
#define LAST_PROMPT     (NUM_PROMPTS - 1)
 
95
 
51
96
/* New fields for the login widget instance record */
52
97
typedef struct {
 
98
#ifndef USE_XFT    
53
99
        Pixel           textpixel;      /* foreground pixel */
54
100
        Pixel           promptpixel;    /* prompt pixel */
55
101
        Pixel           greetpixel;     /* greeting pixel */
56
102
        Pixel           failpixel;      /* failure pixel */
57
 
#ifdef XPM
 
103
#endif
58
104
        Pixel           hipixel;        /* frame hilite pixel */
59
105
        Pixel           shdpixel;       /* shadow frame pixel */
60
 
#endif /* XPM */
61
106
        GC              textGC;         /* pointer to GraphicsContext */
62
107
        GC              bgGC;           /* pointer to GraphicsContext */
63
108
        GC              xorGC;          /* pointer to GraphicsContext */
 
109
#ifndef USE_XFT
64
110
        GC              promptGC;
65
111
        GC              greetGC;
66
112
        GC              failGC;
67
 
#ifdef XPM
 
113
#endif
68
114
        GC              hiGC;           /* for hilight part of frame */
69
115
        GC              shdGC;          /* for shaded part of frame */
70
 
#endif /* XPM */
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 */
 
123
#ifndef USE_XFT    
 
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 */
 
128
#endif /* USE_XFT */
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 */
93
 
#ifdef XPM
 
142
        loginPromptData prompts[NUM_PROMPTS];
 
143
        time_t          msgTimeout;
 
144
 
 
145
#ifdef DANCING
94
146
        /*caolan begin*/
95
 
        int lastEventTime;
 
147
        int             lastEventTime;
96
148
        /*caolan end*/
 
149
#endif /* DANCING */
 
150
    
97
151
        int             outframewidth;  /* outer frame thickness */
98
152
        int             inframeswidth;  /* inner frames thickness */
99
153
        int             sepwidth;       /* width of separator line */
100
154
 
 
155
#ifdef XPM    
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;
107
162
#endif /* XPM */
 
163
#ifdef USE_XFT
 
164
        XftDraw        *draw;
 
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 */
 
173
#endif
108
174
   } LoginPart;
109
175
 
110
176
/* Full instance record declaration */