summaryrefslogtreecommitdiff
path: root/src/eog-close-confirmation-dialog.h
blob: e8510d90e4402d881183c0540b603d0a71f1fddb (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
/*
 * eog-close-confirmation-dialog.h
 * This file is part of eog
 *
 * Author: Marcus Carlson <marcus@mejlamej.nu>
 *
 * Based on gedit code (gedit/gedit-close-confirmation.h) by gedit Team
 *
 * Copyright (C) 2004-2009 GNOME Foundation
 *
 * 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, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef __EOG_CLOSE_CONFIRMATION_DIALOG_H__
#define __EOG_CLOSE_CONFIRMATION_DIALOG_H__

#include <glib.h>
#include <gtk/gtk.h>

#include <eog-image.h>

#define EOG_TYPE_CLOSE_CONFIRMATION_DIALOG		(eog_close_confirmation_dialog_get_type ())
#define EOG_CLOSE_CONFIRMATION_DIALOG(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_CLOSE_CONFIRMATION_DIALOG, EogCloseConfirmationDialog))
#define EOG_CLOSE_CONFIRMATION_DIALOG_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_CLOSE_CONFIRMATION_DIALOG, EogCloseConfirmationDialogClass))
#define EOG_IS_CLOSE_CONFIRMATION_DIALOG(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_CLOSE_CONFIRMATION_DIALOG))
#define EOG_IS_CLOSE_CONFIRMATION_DIALOG_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_CLOSE_CONFIRMATION_DIALOG))
#define EOG_CLOSE_CONFIRMATION_DIALOG_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj),EOG_TYPE_CLOSE_CONFIRMATION_DIALOG, EogCloseConfirmationDialogClass))

typedef struct _EogCloseConfirmationDialog 		EogCloseConfirmationDialog;
typedef struct _EogCloseConfirmationDialogClass 	EogCloseConfirmationDialogClass;
typedef struct _EogCloseConfirmationDialogPrivate 	EogCloseConfirmationDialogPrivate;

struct _EogCloseConfirmationDialog
{
	GtkDialog parent;

	/*< private > */
	EogCloseConfirmationDialogPrivate *priv;
};

struct _EogCloseConfirmationDialogClass
{
	GtkDialogClass parent_class;
};

/**
 * EogCloseConfirmationDialogResponseType:
 * @EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_NONE: Returned if the dialog has no response id,
 * or if the message area gets programmatically hidden or destroyed
 * @EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_CLOSE: Returned by CLOSE button in the dialog
 * @EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_CANCEL: Returned by CANCEL button in the dialog
 * @EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_SAVE: Returned by SAVE button in the dialog
 * @EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_SAVEAS: Returned by SAVE AS button in the dialog
 *
 */
typedef enum
{
	EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_NONE   = 0,
	EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_CLOSE  = 1,
	EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_CANCEL = 2,
	EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_SAVE   = 3,
	EOG_CLOSE_CONFIRMATION_DIALOG_RESPONSE_SAVEAS = 4
} EogCloseConfirmationDialogResponseType;

G_GNUC_INTERNAL
GType 		 eog_close_confirmation_dialog_get_type		(void) G_GNUC_CONST;

G_GNUC_INTERNAL
GtkWidget	*eog_close_confirmation_dialog_new			(GtkWindow     *parent,
									 GList         *unsaved_documents);
G_GNUC_INTERNAL
GtkWidget 	*eog_close_confirmation_dialog_new_single 		(GtkWindow     *parent,
									 EogImage      *image);

G_GNUC_INTERNAL
const GList	*eog_close_confirmation_dialog_get_unsaved_images	(EogCloseConfirmationDialog *dlg);

G_GNUC_INTERNAL
GList		*eog_close_confirmation_dialog_get_selected_images	(EogCloseConfirmationDialog *dlg);

G_GNUC_INTERNAL
void		 eog_close_confirmation_dialog_set_sensitive		(EogCloseConfirmationDialog *dlg, gboolean value);

#endif /* __EOG_CLOSE_CONFIRMATION_DIALOG_H__ */