1 /*
2  * gedit-app.h
3  * This file is part of gedit
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, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef GEDIT_APP_H
22 #define GEDIT_APP_H
23 
24 #include <gtk/gtk.h>
25 #include <gedit/gedit-window.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GEDIT_TYPE_APP (gedit_app_get_type())
30 
31 G_DECLARE_DERIVABLE_TYPE (GeditApp, gedit_app, GEDIT, APP, GtkApplication)
32 
33 struct _GeditAppClass
34 {
35 	GtkApplicationClass parent_class;
36 
37 	gboolean (*show_help)                   (GeditApp    *app,
38 	                                         GtkWindow   *parent,
39 	                                         const gchar *name,
40 	                                         const gchar *link_id);
41 
42 	gchar *(*help_link_id)                  (GeditApp    *app,
43 	                                         const gchar *name,
44 	                                         const gchar *link_id);
45 
46 	void (*set_window_title)                (GeditApp    *app,
47 	                                         GeditWindow *window,
48 	                                         const gchar *title);
49 
50 	GeditWindow *(*create_window)           (GeditApp    *app);
51 
52 	gboolean (*process_window_event)        (GeditApp    *app,
53 	                                         GeditWindow *window,
54 	                                         GdkEvent    *event);
55 };
56 
57 GeditWindow	*gedit_app_create_window		(GeditApp    *app,
58 							 GdkScreen   *screen);
59 
60 GList		*gedit_app_get_main_windows		(GeditApp    *app);
61 
62 GList		*gedit_app_get_documents		(GeditApp    *app);
63 
64 GList		*gedit_app_get_views			(GeditApp    *app);
65 
66 gboolean	 gedit_app_show_help			(GeditApp    *app,
67                                                          GtkWindow   *parent,
68                                                          const gchar *name,
69                                                          const gchar *link_id);
70 
71 void		 gedit_app_set_window_title		(GeditApp    *app,
72                                                          GeditWindow *window,
73                                                          const gchar *title);
74 gboolean	gedit_app_process_window_event		(GeditApp    *app,
75 							 GeditWindow *window,
76 							 GdkEvent    *event);
77 
78 G_END_DECLS
79 
80 #endif /* GEDIT_APP_H */
81 
82 /* ex:set ts=8 noet: */
83