1 /*
2  *  Copyright © 2002 Christophe Fergeau
3  *  Copyright © 2003 Marco Pesenti Gritti
4  *  Copyright © 2003, 2004 Christian Persch
5  *    (ephy-notebook.c)
6  *
7  *  Copyright © 2008 Free Software Foundation, Inc.
8  *    (nemo-notebook.c)
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2, or (at your option)
13  *  any later version.
14  *
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23  *
24  *  $Id: nemo-notebook.h 8210 2008-04-11 20:05:25Z chpe $
25  */
26 
27 #ifndef NEMO_NOTEBOOK_H
28 #define NEMO_NOTEBOOK_H
29 
30 #include <glib.h>
31 #include <gtk/gtk.h>
32 #include "nemo-window-slot.h"
33 
34 G_BEGIN_DECLS
35 
36 #define NEMO_TYPE_NOTEBOOK		(nemo_notebook_get_type ())
37 #define NEMO_NOTEBOOK(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), NEMO_TYPE_NOTEBOOK, NemoNotebook))
38 #define NEMO_NOTEBOOK_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), NEMO_TYPE_NOTEBOOK, NemoNotebookClass))
39 #define NEMO_IS_NOTEBOOK(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), NEMO_TYPE_NOTEBOOK))
40 #define NEMO_IS_NOTEBOOK_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), NEMO_TYPE_NOTEBOOK))
41 #define NEMO_NOTEBOOK_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), NEMO_TYPE_NOTEBOOK, NemoNotebookClass))
42 
43 typedef struct _NemoNotebookClass	NemoNotebookClass;
44 typedef struct _NemoNotebook		NemoNotebook;
45 
46 struct _NemoNotebook
47 {
48 	GtkNotebook parent;
49 };
50 
51 struct _NemoNotebookClass
52 {
53         GtkNotebookClass parent_class;
54 
55 	/* Signals */
56 	void	 (* tab_close_request)  (NemoNotebook *notebook,
57 					 NemoWindowSlot *slot);
58 };
59 
60 GType		nemo_notebook_get_type		(void);
61 
62 int		nemo_notebook_add_tab	(NemoNotebook *nb,
63 						 NemoWindowSlot *slot,
64 						 int position,
65 						 gboolean jump_to);
66 gint		nemo_notebook_find_tab_num_at_pos (NemoNotebook *nb,
67 						   gint 	 abs_x,
68 						   gint 	 abs_y);
69 
70 void		nemo_notebook_set_show_tabs	(NemoNotebook *nb,
71 						 gboolean show_tabs);
72 
73 void		nemo_notebook_set_dnd_enabled (NemoNotebook *nb,
74 						   gboolean enabled);
75 void		nemo_notebook_sync_tab_label (NemoNotebook *nb,
76 						  NemoWindowSlot *slot);
77 void		nemo_notebook_sync_loading   (NemoNotebook *nb,
78 						  NemoWindowSlot *slot);
79 
80 void		nemo_notebook_reorder_child_relative (NemoNotebook *notebook,
81 						      int	    page_num,
82 						      int 	    offset);
83 void		nemo_notebook_set_current_page_relative (NemoNotebook *notebook,
84 							     int offset);
85 
86 gboolean        nemo_notebook_can_reorder_child_relative (NemoNotebook *notebook,
87 							  int	    	page_num,
88 							  int 	    	offset);
89 gboolean        nemo_notebook_can_set_current_page_relative (NemoNotebook *notebook,
90 								 int offset);
91 
92 G_END_DECLS
93 
94 #endif /* NEMO_NOTEBOOK_H */
95 
96