summaryrefslogtreecommitdiffstats
path: root/gedit/gedit-file-chooser-dialog.h
blob: b759c6566c379e4df49bb1eb14462be09b0d9d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 * gedit-file-chooser-dialog.h
 * This file is part of gedit
 *
 * Copyright (C) 2014 - Jesse van den Kieboom
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GEDIT_FILE_CHOOSER_DIALOG_H
#define GEDIT_FILE_CHOOSER_DIALOG_H

#include <gtksourceview/gtksource.h>

G_BEGIN_DECLS

#define GEDIT_TYPE_FILE_CHOOSER_DIALOG (gedit_file_chooser_dialog_get_type ())

G_DECLARE_INTERFACE (GeditFileChooserDialog, gedit_file_chooser_dialog,
		     GEDIT, FILE_CHOOSER_DIALOG,
		     GObject)

struct _GeditFileChooserDialogInterface
{
	GTypeInterface g_iface;

	/* Virtual public methods */
	void	(*set_encoding)		(GeditFileChooserDialog  *dialog,
					 const GtkSourceEncoding *encoding);

	const GtkSourceEncoding *
		(*get_encoding)		(GeditFileChooserDialog *dialog);

	void	(*set_newline_type)	(GeditFileChooserDialog  *dialog,
					 GtkSourceNewlineType     newline_type);

	GtkSourceNewlineType
		(*get_newline_type)	(GeditFileChooserDialog *dialog);

	void	(*set_current_folder)	(GeditFileChooserDialog *dialog,
					 GFile                  *folder);

	void	(*set_current_name)	(GeditFileChooserDialog *dialog,
					 const gchar            *name);

	void	(*set_file)		(GeditFileChooserDialog *dialog,
					 GFile                  *file);

	GFile *	(*get_file)		(GeditFileChooserDialog *dialog);

	void	(*set_do_overwrite_confirmation)
					(GeditFileChooserDialog *dialog,
					 gboolean                overwrite_confirmation);

	void	(*show)			(GeditFileChooserDialog *dialog);

	void    (*destroy)		(GeditFileChooserDialog *dialog);

	void	(*set_modal)		(GeditFileChooserDialog *dialog,
					 gboolean                is_modal);

	GtkWindow *
		(*get_window)		(GeditFileChooserDialog *dialog);
};

GeditFileChooserDialog *
		gedit_file_chooser_dialog_create		(const gchar              *title,
								 GtkWindow                *parent,
								 const gchar              *accept_label,
								 const gchar              *cancel_label);

void		 gedit_file_chooser_dialog_destroy		(GeditFileChooserDialog   *dialog);

void		 gedit_file_chooser_dialog_set_encoding		(GeditFileChooserDialog   *dialog,
								 const GtkSourceEncoding  *encoding);

const GtkSourceEncoding *
		 gedit_file_chooser_dialog_get_encoding		(GeditFileChooserDialog   *dialog);

void		 gedit_file_chooser_dialog_set_newline_type	(GeditFileChooserDialog   *dialog,
								 GtkSourceNewlineType      newline_type);

GtkSourceNewlineType
		 gedit_file_chooser_dialog_get_newline_type	(GeditFileChooserDialog   *dialog);

void		 gedit_file_chooser_dialog_set_current_folder	(GeditFileChooserDialog   *dialog,
								 GFile                    *folder);

void		 gedit_file_chooser_dialog_set_current_name	(GeditFileChooserDialog   *dialog,
								 const gchar              *name);

void		 gedit_file_chooser_dialog_set_file		(GeditFileChooserDialog   *dialog,
								 GFile                    *file);

GFile		*gedit_file_chooser_dialog_get_file		(GeditFileChooserDialog   *dialog);

void		 gedit_file_chooser_dialog_set_do_overwrite_confirmation (
								 GeditFileChooserDialog   *dialog,
								 gboolean                  overwrite_confirmation);

void		 gedit_file_chooser_dialog_show			(GeditFileChooserDialog   *dialog);

void		 gedit_file_chooser_dialog_set_modal		(GeditFileChooserDialog   *dialog,
								 gboolean                  is_modal);

GtkWindow	*gedit_file_chooser_dialog_get_window		(GeditFileChooserDialog   *dialog);

G_END_DECLS

#endif /* GEDIT_FILE_CHOOSER_DIALOG_H */

/* ex:set ts=8 noet: */