1 /*
2  * xed-file-chooser-dialog.h
3  * This file is part of xed
4  *
5  * Copyright (C) 2005 - Paolo Maggi
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 /*
24  * Modified by the xed Team, 2005. See the AUTHORS file for a
25  * list of people on the xed Team.
26  * See the ChangeLog files for a list of changes.
27  *
28  * $Id$
29  */
30 
31 #ifndef __XED_FILE_CHOOSER_DIALOG_H__
32 #define __XED_FILE_CHOOSER_DIALOG_H__
33 
34 #include <gtksourceview/gtksource.h>
35 
36 #include <xed/xed-enum-types.h>
37 #include <xed/xed-document.h>
38 
39 G_BEGIN_DECLS
40 
41 #define XED_TYPE_FILE_CHOOSER_DIALOG             (xed_file_chooser_dialog_get_type ())
42 #define XED_FILE_CHOOSER_DIALOG(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_FILE_CHOOSER_DIALOG, XedFileChooserDialog))
43 #define XED_FILE_CHOOSER_DIALOG_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), XED_TYPE_FILE_CHOOSER_DIALOG, XedFileChooserDialogClass))
44 #define XED_IS_FILE_CHOOSER_DIALOG(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XED_TYPE_FILE_CHOOSER_DIALOG))
45 #define XED_IS_FILE_CHOOSER_DIALOG_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), XED_TYPE_FILE_CHOOSER_DIALOG))
46 #define XED_FILE_CHOOSER_DIALOG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), XED_TYPE_FILE_CHOOSER_DIALOG, XedFileChooserDialogClass))
47 
48 typedef struct _XedFileChooserDialog        XedFileChooserDialog;
49 typedef struct _XedFileChooserDialogPrivate XedFileChooserDialogPrivate;
50 typedef struct _XedFileChooserDialogClass   XedFileChooserDialogClass;
51 
52 struct _XedFileChooserDialog
53 {
54     GtkFileChooserDialog parent_instance;
55 
56     XedFileChooserDialogPrivate *priv;
57 };
58 
59 struct _XedFileChooserDialogClass
60 {
61     GtkFileChooserDialogClass parent_class;
62 };
63 
64 GType xed_file_chooser_dialog_get_type (void) G_GNUC_CONST;
65 
66 GtkWidget *xed_file_chooser_dialog_new (const gchar             *title,
67                                         GtkWindow               *parent,
68                                         GtkFileChooserAction     action,
69                                         const GtkSourceEncoding *encoding,
70                                         const gchar             *first_button_text,
71                                         ...);
72 
73 void xed_file_chooser_dialog_set_encoding (XedFileChooserDialog    *dialog,
74                                            const GtkSourceEncoding *encoding);
75 
76 const GtkSourceEncoding *xed_file_chooser_dialog_get_encoding (XedFileChooserDialog *dialog);
77 
78 void xed_file_chooser_dialog_set_newline_type (XedFileChooserDialog *dialog,
79                                                GtkSourceNewlineType  newline_type);
80 
81 GtkSourceNewlineType xed_file_chooser_dialog_get_newline_type (XedFileChooserDialog *dialog);
82 
83 G_END_DECLS
84 
85 #endif /* __XED_FILE_CHOOSER_DIALOG_H__ */
86