Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / lib / ephy-password-dialog.h
bloba9b432794721e0250148d08442a0c3f9490ed3bd
1 /*
2 * Copyright © 2005 Christian Persch
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * $Id: ephy-password-dialog.h 6952 2007-03-11 19:42:02Z chpe $
21 #ifndef EPHY_PASSWORD_DIALOG_H
22 #define EPHY_PASSWORD_DIALOG_H
24 #include <gtk/gtkmessagedialog.h>
25 #include <libgnomeui/gnome-password-dialog.h>
27 G_BEGIN_DECLS
29 #define EPHY_TYPE_PASSWORD_DIALOG (ephy_password_dialog_get_type ())
30 #define EPHY_PASSWORD_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_PASSWORD_DIALOG, EphyPasswordDialog))
31 #define EPHY_PASSWORD_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_PASSWORD_DIALOG, EphyPasswordDialogClass))
32 #define EPHY_IS_PASSWORD_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_PASSWORD_DIALOG))
33 #define EPHY_IS_PASSWORD_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_PASSWORD_DIALOG))
34 #define EPHY_PASSWORD_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_PASSWORD_DIALOG, EphyPasswordDialogClass))
36 typedef struct _EphyPasswordDialog EphyPasswordDialog;
37 typedef struct _EphyPasswordDialogPrivate EphyPasswordDialogPrivate;
38 typedef struct _EphyPasswordDialogClass EphyPasswordDialogClass;
40 struct _EphyPasswordDialog
42 GtkMessageDialog parent_instance;
44 /*< private >*/
45 EphyPasswordDialogPrivate *priv;
48 struct _EphyPasswordDialogClass
50 GtkMessageDialogClass parent_class;
53 typedef enum
55 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_USERNAME = 1 << 0,
56 EPHY_PASSWORD_DIALOG_FLAGS_EDIT_USERNAME = 1 << 1,
57 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_DOMAIN = 1 << 2,
58 EPHY_PASSWORD_DIALOG_FLAGS_EDIT_DOMAIN = 1 << 3,
59 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_PASSWORD = 1 << 4,
60 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_NEW_PASSWORD = 1 << 5,
61 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_QUALITY_METER = 1 << 6,
62 EPHY_PASSWORD_DIALOG_FLAGS_SHOW_REMEMBER = 1 << 7,
63 } EphyPasswordDialogFlags;
65 #define EPHY_PASSWORD_DIALOG_FLAGS_DEFAULT 0
67 GType ephy_password_dialog_get_type (void);
69 GtkWidget *ephy_password_dialog_new (GtkWidget *parent,
70 const char *title,
71 EphyPasswordDialogFlags flags);
73 void ephy_password_dialog_set_remember (EphyPasswordDialog *dialog,
74 GnomePasswordDialogRemember remember);
76 GnomePasswordDialogRemember ephy_password_dialog_get_remember (EphyPasswordDialog *dialog);
78 void ephy_password_dialog_set_label (EphyPasswordDialog *dialog,
79 const char *markup);
81 GtkWidget *ephy_password_dialog_get_username_entry (EphyPasswordDialog *dialog);
83 const char *ephy_password_dialog_get_username (EphyPasswordDialog *dialog);
85 void ephy_password_dialog_set_username (EphyPasswordDialog *dialog,
86 const char *text);
88 const char *ephy_password_dialog_get_domain (EphyPasswordDialog *dialog);
90 void ephy_password_dialog_set_domain (EphyPasswordDialog *dialog,
91 const char *text);
93 const char *ephy_password_dialog_get_password (EphyPasswordDialog *dialog);
95 void ephy_password_dialog_set_password (EphyPasswordDialog *dialog,
96 const char *text);
98 const char *ephy_password_dialog_get_new_password (EphyPasswordDialog *dialog);
100 G_END_DECLS
102 #endif /* !EPHY_PASSWORD_DIALOG_H */