sync with 0.7.5
[claws.git] / src / manage_window.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2002 Hiroyuki Yamamoto
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 2 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, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __MANAGE_WINDOW_H__
21 #define __MANAGE_WINDOW_H__
22
23 #include <glib.h>
24 #include <gtk/gtkwidget.h>
25 #include <gtk/gtkwindow.h>
26
27 #define MANAGE_WINDOW_SIGNALS_CONNECT(window) \
28 { \
29         gtk_signal_connect(GTK_OBJECT(window), "focus_in_event", \
30                            GTK_SIGNAL_FUNC(manage_window_focus_in), NULL); \
31         gtk_signal_connect(GTK_OBJECT(window), "focus_out_event", \
32                            GTK_SIGNAL_FUNC(manage_window_focus_out), NULL); \
33         gtk_signal_connect(GTK_OBJECT(window), "unmap_event", \
34                            GTK_SIGNAL_FUNC(manage_window_unmap), NULL); \
35         gtk_signal_connect(GTK_OBJECT(window), "destroy", \
36                            GTK_SIGNAL_FUNC(manage_window_destroy), NULL); \
37 }
38
39 gint manage_window_focus_in             (GtkWidget      *widget,
40                                          GdkEventFocus  *event,
41                                          gpointer        data);
42 gint manage_window_focus_out            (GtkWidget      *widget,
43                                          GdkEventFocus  *event,
44                                          gpointer        data);
45 gint manage_window_unmap                (GtkWidget      *widget,
46                                          GdkEventAny    *event,
47                                          gpointer        data);
48 gint manage_window_delete               (GtkWidget      *widget,
49                                          GdkEventAny    *event,
50                                          gpointer        data);
51 void manage_window_destroy              (GtkWidget      *widget,
52                                          gpointer        data);
53
54 void manage_window_set_transient        (GtkWindow      *window);
55
56 extern GtkWidget *focus_window;
57
58 GtkWidget *manage_window_get_focus_window       (void);
59
60 #endif /* __MANAGE_WINDOW_H__ */