usr/src/cmd/gui-install/src/users-screen.h
author Alasdair Lumsden <al@everycity.co.uk>
Fri, 09 Sep 2011 17:09:49 +0000
branchoi_151a
changeset 1428 86a7635702d7
parent 634 e84402006fa5
permissions -rw-r--r--
Backing out 1436 Installation does not need to ask Root Password

/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef __USERS_SCREEN_H
#define	__USERS_SCREEN_H

#define	MAX_LOGIN_NAME_LEN	8

#ifdef __cplusplus
extern "C" {
#endif

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <glade/glade.h>

typedef struct _UsersWindowXML {
	GtkWidget *userstoplevel;
	GtkWidget *rootpassword1entry;
	GtkWidget *rootpassword2entry;
	GtkWidget *rootpasswordinfo;
	GtkWidget *rootpasswordinfoimage;
	GtkWidget *rootpasswordinfolabel;
	GtkWidget *usernameentry;
	GtkWidget *loginnameentry;
	GtkWidget *loginnameinfo;
	GtkWidget *loginnameinfoimage;
	GtkWidget *loginnameinfolabel;
	GtkWidget *userpassword1entry;
	GtkWidget *userpassword2entry;
	GtkWidget *userpasswordinfo;
	GtkWidget *userpasswordinfoimage;
	GtkWidget *userpasswordinfolabel;
	GtkWidget *hostnameentry;
	GtkWidget *hostnameinfo;
	GtkWidget *hostnameinfoimage;
	GtkWidget *hostnameinfolabel;

	gboolean error_posted;
} UsersWindowXML;

void		users_window_init(void);

void		users_load_widgets(void);

gboolean	users_validate(void);

void		users_clear_info_warning_labels(void);

gboolean	users_validate_root_passwords(GtkWidget *widget,
				gboolean check_changed);

gboolean	users_validate_login_name(gboolean check_changed);

gboolean	users_validate_user_passwords(GtkWidget *widget,
				gboolean check_changed);

gboolean	users_validate_host_name(gboolean check_changed);

gboolean	user_account_entered(void);

gboolean	root_password_entered(void);

void		users_store_data(void);

void		users_entry_unselect_text(GtkWidget *widget);

void		users_entry_select_text(GtkWidget *widget);

gboolean	users_password_key_press(GtkWidget *entry,
				GdkEventKey *event,
				gpointer user_data);

gboolean	users_password_button_press(GtkWidget *entry,
				GdkEventButton *event,
				gpointer user_data);

#ifdef __cplusplus
}
#endif

#endif /* __USERS_SCREEN_H */