comparison finch/gntlog.h @ 22248:88796aff14d6

Add a finch log viewer. This is largely copied from Pidgin. The search box must be focused in order to scroll the log or fire up the pager, and is labelled such. Feel free to come up with a better widget to attach these to.
author Richard Nelson <wabz@pidgin.im>
date Sat, 02 Feb 2008 03:51:19 +0000
parents
children 3d7e9eff04d0
comparison
equal deleted inserted replaced
22247:5ffb0b5f785f 22248:88796aff14d6
1 /**
2 * @file gntlog.h GNT Log viewer
3 * @ingroup finch
4 * @see @ref gntlog-signals
5 */
6
7 /* finch
8 *
9 * Finch is the legal property of its developers, whose names are too numerous
10 * to list here. Please refer to the COPYRIGHT file distributed with this
11 * source distribution.
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 */
27 #ifndef _FINCHLOG_H_
28 #define _FINCHLOG_H_
29
30 #include "log.h"
31 #include "account.h"
32 #include "gntwidget.h"
33
34 typedef struct _FinchLogViewer FinchLogViewer;
35
36 /**
37 * A GNT Log Viewer. You can look at logs with it.
38 */
39 struct _FinchLogViewer {
40 GList *logs; /**< The list of logs viewed in this viewer */
41
42 GntWidget *window; /**< The viewer's window */
43 GntWidget *tree; /**< The tree representing said treestore */
44 GntWidget *text; /**< The text to display said logs */
45 GntWidget *entry; /**< The search entry, in which search terms
46 * are entered */
47 GntWidget *label;
48 PurpleLogReadFlags flags; /**< The most recently used log flags */
49 char *search; /**< The string currently being searched for */
50 };
51
52
53
54 void finch_log_show(PurpleLogType type, const char *screenname, PurpleAccount *account);
55 void finch_log_show_contact(PurpleContact *contact);
56
57 void finch_syslog_show(void);
58
59 /**************************************************************************/
60 /** @name GNT Log Subsystem */
61 /**************************************************************************/
62 /*@{*/
63
64 /**
65 * Initializes the GNT log subsystem.
66 */
67 void finch_log_init(void);
68
69 /**
70 * Returns the GNT log subsystem handle.
71 *
72 * @return The GNT log subsystem handle.
73 */
74 void *finch_log_get_handle(void);
75
76 /**
77 * Uninitializes the GNT log subsystem.
78 */
79 void finch_log_uninit(void);
80
81 /*@}*/
82
83 #endif