1 /*
2  * gui_tray.h: system tray support
3  * Copyright (C) 2003-2004 Saulius Menkevicius
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  * $Id: gui_tray.h,v 1.7 2004/09/27 00:25:04 bobas Exp $
20  */
21 
22 #ifndef GUI_TRAY_H__
23 #define GUI_TRAY_H__
24 
25 /* preferences registered in the 'gui_tray' module */
26 #define PREFS_GUI_TRAY_ENABLE		"gui/tray/enable"
27 #define PREFS_GUI_TRAY_TRIGGERS_JOIN_LEAVE "gui/tray/triggers/join_leave"
28 #define PREFS_GUI_TRAY_TRIGGERS_CHANNEL	"gui/tray/triggers/channel"
29 #define PREFS_GUI_TRAY_TRIGGERS_PRIVATE	"gui/tray/triggers/private"
30 #define PREFS_GUI_TRAY_TRIGGERS_STATUS	"gui/tray/triggers/status"
31 #define PREFS_GUI_TRAY_TRIGGERS_TOPIC	"gui/tray_triggers/topic"
32 #define PREFS_GUI_TRAY_HIDE_WND_ON_STARTUP "gui/tray/hide_wnd_on_startup"
33 #define PREFS_GUI_TRAY_TOOLTIP_LINE_NUM	"gui/tray/tooltip_line_num"
34 
35 void gui_tray_register();
36 gboolean gui_tray_is_embedded();
37 
38 #ifdef GUI_TRAY_IMPL
39 
40 /* system tray ops common to all implementations
41  */
42 typedef void tray_embedded_notifier();
43 typedef void tray_removed_notifier();
44 typedef void tray_clicked_notifier(guint button, guint32 time);
45 
46 struct tray_impl_ops {
47 	gboolean (*create)();
48 	void (*destroy)();
49 	void (*set_icon)(gboolean, enum user_mode_enum);
50 	void (*set_tooltip)(const gchar *);
51 
52 	void (*set_embedded_notifier)(tray_embedded_notifier *);
53 	void (*set_removed_notifier)(tray_removed_notifier *);
54 	void (*set_clicked_notifier)(tray_clicked_notifier *);
55 };
56 
57 /* tray_impl_get_ops():
58  *	returns a pointer to the implementation's ops struct
59  */
60 const struct tray_impl_ops * tray_impl_init();
61 
62 #endif	/* #ifdef GUI_TRAY_IMPL */
63 
64 #endif	/* #ifndef GUI_TRAY_H__ */
65 
66