~ubuntu-branches/ubuntu/precise/krb5/precise-updates

« back to all changes in this revision

Viewing changes to src/windows/identity/ui/newcredwnd.h

  • Committer: Package Import Robot
  • Author(s): Sam Hartman
  • Date: 2011-12-01 19:34:41 UTC
  • mfrom: (28.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20111201193441-9tipg3aru1jsidyv
Tags: 1.10+dfsg~alpha1-6
* Fix segfault with unknown hostnames in krb5_sname_to_principal,
  Closes: #650671
* Indicate that this library breaks libsmbclient versions that depend on
  krb5_locate_kdc, Closes: #650603, #650611

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2005 Massachusetts Institute of Technology
3
 
 *
4
 
 * Permission is hereby granted, free of charge, to any person
5
 
 * obtaining a copy of this software and associated documentation
6
 
 * files (the "Software"), to deal in the Software without
7
 
 * restriction, including without limitation the rights to use, copy,
8
 
 * modify, merge, publish, distribute, sublicense, and/or sell copies
9
 
 * of the Software, and to permit persons to whom the Software is
10
 
 * furnished to do so, subject to the following conditions:
11
 
 *
12
 
 * The above copyright notice and this permission notice shall be
13
 
 * included in all copies or substantial portions of the Software.
14
 
 *
15
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19
 
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20
 
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
 
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
 
 * SOFTWARE.
23
 
 */
24
 
 
25
 
/* $Id$ */
26
 
 
27
 
#ifndef __KHIMAIRA_NEWCREDWND_H
28
 
#define __KHIMAIRA_NEWCREDWND_H
29
 
 
30
 
#include<khuidefs.h>
31
 
 
32
 
#define KHUI_NEWCREDWND_CLASS L"KhmNewCredWnd"
33
 
 
34
 
typedef enum tag_nc_notification_types {
35
 
    NC_NOTIFY_NONE = 0,         /* no notification */
36
 
    NC_NOTIFY_MARQUEE,          /* marquee type notification */
37
 
    NC_NOTIFY_PROGRESS,         /* progress notification */
38
 
    NC_NOTIFY_MESSAGE,          /* a message */
39
 
} nc_notification_type;
40
 
 
41
 
typedef struct khui_nc_wnd_data_t {
42
 
    khui_new_creds * nc;
43
 
 
44
 
    /* The tab control */
45
 
 
46
 
    HWND tab_wnd;               /* tab control */
47
 
    int current_panel;          /* ordinal of the current panel being
48
 
                                   displayed. */
49
 
 
50
 
    /* The main panel */
51
 
    HWND dlg_main;              /* main dialog */
52
 
    RECT r_main;                /* the extent of the main panel that
53
 
                                   we have used so far.  The rect
54
 
                                   includes the size of the area used
55
 
                                   by the identity selector controls,
56
 
                                   the custom controls added by
57
 
                                   credentials providers and the
58
 
                                   buttons that may be required when
59
 
                                   in the mini mode. */
60
 
    RECT r_required;            /* required size of the main window */
61
 
 
62
 
    /* The button bar */
63
 
 
64
 
    HWND dlg_bb;                /* button bar */
65
 
 
66
 
    /* Sizing the new credentials window */
67
 
 
68
 
    BOOL animation_enabled;     /* Flag indicating whether animation
69
 
                                   is enabled for the dialg.  If this
70
 
                                   flag is off, we don't animate size
71
 
                                   changes even if the configuration
72
 
                                   says so. */
73
 
    BOOL size_changing;         /* flag indicating that the size of
74
 
                                   the main window is being
75
 
                                   adjusted. */
76
 
    RECT sz_ch_source;          /* Source size, from which we are
77
 
                                   going towards target size in
78
 
                                   sz_ch_max steps. The RECT is self
79
 
                                   relative (i.e. left=0 and top=0)*/
80
 
    RECT sz_ch_target;          /* If we are doing an incremental size
81
 
                                   change, this holds the target size
82
 
                                   that we were going for.  Note that
83
 
                                   the target size might change while
84
 
                                   we are adjusting the size.  So this
85
 
                                   helps keep track of whether we need
86
 
                                   to start the size change again. The
87
 
                                   RECT is self relative (i.e. left=0
88
 
                                   and top=0). */
89
 
    int  sz_ch_increment;       /* Current step of the incremental
90
 
                                   size change operation. */
91
 
    int  sz_ch_max;             /* Max number of steps in the size
92
 
                                   change operation. */
93
 
    int  sz_ch_timeout;         /* Milliseconds between each increment */
94
 
 
95
 
    BOOL flashing_enabled;      /* The window maybe still flashing
96
 
                                   from the last call to
97
 
                                   FlashWindowEx(). */
98
 
 
99
 
    /* Custom controls and identity specifiers */
100
 
 
101
 
    HWND hwnd_banner;           /* static control for banner */
102
 
    HWND hwnd_name;             /* static control for name */
103
 
 
104
 
    HWND hwnd_last_idspec;      /* last identity specifier control */
105
 
 
106
 
    /* Notification windows */
107
 
 
108
 
    nc_notification_type notif_type; /* Type of notification */
109
 
    HWND hwnd_notif_label;      /* Label for notifications */
110
 
    HWND hwnd_notif_aux;        /* Other control for notifications */
111
 
 
112
 
    /* Areas of the main panel */
113
 
 
114
 
    RECT r_idspec;          /* Area used by identity specifiers
115
 
                               (relative to client) */
116
 
    RECT r_custprompt;      /* Area used by custom controls (relative
117
 
                               to client) */
118
 
    RECT r_notif;           /* Area used for notifications. */
119
 
 
120
 
    /* Metrics for custom prompts and identity specifiers */
121
 
 
122
 
    RECT r_row;             /* Metrics for a control row (left=0,
123
 
                               top=0, right=width, bottom=height) */
124
 
    RECT r_area;            /* Area available for controls (relative
125
 
                               to client) */
126
 
    RECT r_n_label;         /* coords of the static control (relative
127
 
                               to row) */
128
 
    RECT r_n_input;         /* coords of the edit control (relative to
129
 
                               row) */
130
 
    RECT r_e_label;         /* coords of the extended edit control
131
 
                               (relative to row) */
132
 
    RECT r_e_input;         /* coords of the extended edit control
133
 
                               (relative to row) */
134
 
    RECT r_credtext;        /* Area for credtext window (relative to
135
 
                               row) */
136
 
} khui_nc_wnd_data;
137
 
 
138
 
void khm_register_newcredwnd_class(void);
139
 
void khm_unregister_newcredwnd_class(void);
140
 
HWND khm_create_newcredwnd(HWND parent, khui_new_creds * c);
141
 
void khm_prep_newcredwnd(HWND hwnd);
142
 
void khm_show_newcredwnd(HWND hwnd);
143
 
 
144
 
/* Width of the button bar in dialog units */
145
 
#define NCDLG_BBAR_WIDTH 66
146
 
/* Height of the button bar in dialog units */
147
 
#define NCDLG_BBAR_HEIGHT 190
148
 
 
149
 
/* Control identifier for the tab control in the new credentials
150
 
   dialog. We declare this here since we will be creating the control
151
 
   manually. */
152
 
#define IDC_NC_TABS 8001
153
 
 
154
 
/* This is the first control ID that is created in the custom tabstrip
155
 
   control buttons.  Subsequent buttons get consecutive IDs starting
156
 
   from this one.  */
157
 
#define NC_TS_CTRL_ID_MIN 8002
158
 
 
159
 
/* Maximum number of controls */
160
 
#define NC_TS_MAX_CTRLS 8
161
 
 
162
 
/* Maximum control ID */
163
 
#define NC_TS_CTRL_ID_MAX (NC_TS_CTRL_ID_MIN + NC_TS_MAX_CTRLS - 1)
164
 
 
165
 
#define NC_BN_SET_DEF_ID 8012
166
 
 
167
 
/* the first control ID that may be used by an identity provider */
168
 
#define NC_IS_CTRL_ID_MIN 8016
169
 
 
170
 
/* the maximum number of controls that may be created by an identity
171
 
   provider*/
172
 
#define NC_IS_CTRL_MAX_CTRLS 8
173
 
 
174
 
/* the maximum control ID that may be used by an identity provider */
175
 
#define NC_IS_CTRL_ID_MAX (NC_IS_CTRL_ID_MIN + NC_IS_MAX_CTRLS - 1)
176
 
 
177
 
#define NC_WINDOW_EX_STYLES (WS_EX_DLGMODALFRAME | WS_EX_CONTEXTHELP | WS_EX_APPWINDOW)
178
 
#define NC_WINDOW_STYLES    (WS_DLGFRAME | WS_POPUPWINDOW | WS_CLIPCHILDREN)
179
 
 
180
 
#define NC_SZ_STEPS_MIN 3
181
 
#define NC_SZ_STEPS_DEF 10
182
 
#define NC_SZ_STEPS_MAX 100
183
 
 
184
 
#define NC_SZ_TIMEOUT_MIN 5
185
 
#define NC_SZ_TIMEOUT_DEF 10
186
 
#define NC_SZ_TIMEOUT_MAX 500
187
 
 
188
 
#define NC_TIMER_SIZER         1001
189
 
#define NC_TIMER_ENABLEANIMATE 1002
190
 
 
191
 
#define ENABLEANIMATE_TIMEOUT  400
192
 
 
193
 
#endif