gedit-tab.h 2.37 KB
Newer Older
Paolo Borelli's avatar
Paolo Borelli committed
1 2 3 4
/*
 * gedit-tab.h
 * This file is part of gedit
 *
5
 * Copyright (C) 2005 - Paolo Maggi
Paolo Borelli's avatar
Paolo Borelli committed
6 7 8 9 10 11 12 13 14 15 16 17
 *
 * 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
18
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
Paolo Borelli's avatar
Paolo Borelli committed
19
 */
20

21 22
#ifndef GEDIT_TAB_H
#define GEDIT_TAB_H
Paolo Borelli's avatar
Paolo Borelli committed
23

24
#include <gtksourceview/gtksource.h>
Paolo Borelli's avatar
Paolo Borelli committed
25 26 27 28 29 30 31 32 33 34
#include <gedit/gedit-view.h>
#include <gedit/gedit-document.h>

G_BEGIN_DECLS

typedef enum
{
	GEDIT_TAB_STATE_NORMAL = 0,
	GEDIT_TAB_STATE_LOADING,
	GEDIT_TAB_STATE_REVERTING,
35
	GEDIT_TAB_STATE_SAVING,
Paolo Borelli's avatar
Paolo Borelli committed
36
	GEDIT_TAB_STATE_PRINTING,
37
	GEDIT_TAB_STATE_PRINT_PREVIEWING, /* unused, deprecated */
Paolo Borelli's avatar
Paolo Borelli committed
38
	GEDIT_TAB_STATE_SHOWING_PRINT_PREVIEW,
39
	GEDIT_TAB_STATE_GENERIC_NOT_EDITABLE, /* unused, deprecated */
Paolo Borelli's avatar
Paolo Borelli committed
40
	GEDIT_TAB_STATE_LOADING_ERROR,
41
	GEDIT_TAB_STATE_REVERTING_ERROR,
Paolo Borelli's avatar
Paolo Borelli committed
42 43 44
	GEDIT_TAB_STATE_SAVING_ERROR,
	GEDIT_TAB_STATE_GENERIC_ERROR,
	GEDIT_TAB_STATE_CLOSING,
45
	GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION,
Paolo Borelli's avatar
Paolo Borelli committed
46 47 48
	GEDIT_TAB_NUM_OF_STATES /* This is not a valid state */
} GeditTabState;

49
#define GEDIT_TYPE_TAB (gedit_tab_get_type())
50

51
G_DECLARE_FINAL_TYPE (GeditTab, gedit_tab, GEDIT, TAB, GtkBox)
Paolo Borelli's avatar
Paolo Borelli committed
52

53
GeditView	*gedit_tab_get_view			(GeditTab            *tab);
Paolo Borelli's avatar
Paolo Borelli committed
54 55

/* This is only an helper function */
56
GeditDocument	*gedit_tab_get_document			(GeditTab            *tab);
Paolo Borelli's avatar
Paolo Borelli committed
57

58
GeditTab	*gedit_tab_get_from_document		(GeditDocument       *doc);
Paolo Borelli's avatar
Paolo Borelli committed
59

60
GeditTabState	 gedit_tab_get_state			(GeditTab            *tab);
Paolo Borelli's avatar
Paolo Borelli committed
61

62
gboolean	 gedit_tab_get_auto_save_enabled	(GeditTab            *tab);
63

64 65
void		 gedit_tab_set_auto_save_enabled	(GeditTab            *tab,
							 gboolean            enable);
66

67
gint		 gedit_tab_get_auto_save_interval	(GeditTab            *tab);
68

69 70
void		 gedit_tab_set_auto_save_interval	(GeditTab            *tab,
							 gint                interval);
71

72 73
void		 gedit_tab_set_info_bar			(GeditTab            *tab,
							 GtkWidget           *info_bar);
74

Paolo Borelli's avatar
Paolo Borelli committed
75 76
G_END_DECLS

77
#endif  /* GEDIT_TAB_H  */
Garrett Regier's avatar
Garrett Regier committed
78

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