1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef __MANAGE_WINDOW_H__
21 #define __MANAGE_WINDOW_H__
22 
23 #include <glib.h>
24 #include <gtk/gtk.h>
25 
26 #define MANAGE_WINDOW_SIGNALS_CONNECT(window) \
27 { \
28 	g_signal_connect(G_OBJECT(window), "focus_in_event", \
29 			 G_CALLBACK(manage_window_focus_in), NULL); \
30 	g_signal_connect(G_OBJECT(window), "focus_out_event", \
31 			 G_CALLBACK(manage_window_focus_out), NULL); \
32 	g_signal_connect(G_OBJECT(window), "unmap_event", \
33 			 G_CALLBACK(manage_window_unmap), NULL); \
34 	g_signal_connect(G_OBJECT(window), "destroy", \
35 			 G_CALLBACK(manage_window_destroy), NULL); \
36 }
37 
38 gint manage_window_focus_in		(GtkWidget	*widget,
39 					 GdkEventFocus	*event,
40 					 gpointer	 data);
41 gint manage_window_focus_out		(GtkWidget	*widget,
42 					 GdkEventFocus	*event,
43 					 gpointer	 data);
44 gint manage_window_unmap		(GtkWidget	*widget,
45 					 GdkEventAny	*event,
46 					 gpointer	 data);
47 void manage_window_destroy		(GtkWidget	*widget,
48 					 gpointer	 data);
49 
50 void manage_window_set_transient	(GtkWindow	*window);
51 
52 extern GtkWidget *focus_window;
53 
54 #endif /* __MANAGE_WINDOW_H__ */
55