pidgin/gtkdebug.h

Tue, 07 May 2013 05:04:46 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 07 May 2013 05:04:46 -0400
changeset 33923
0fcc5635daba
parent 32790
b95c7c504118
child 35393
00f876b129bc
permissions
-rw-r--r--

Rewrite debug window filter in JS.

Note, this does cause a couple regressions, but they are probably not
that big a deal. First, the JS regular expression syntax is slightly
different. Second, the JS regex API lacks a way to reliably determine
the location of matched groups, so we can't highlight just the groups
and must highlight the entire expression.

I suspect that none of our users ever had to use any fancy regex in the
debug window, and that most of our developers didn't even know it could
be done. So I doubt these regressions will cause much pain.

5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
5497
da3c08f3af25 [gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents: 5212
diff changeset
2 * @file gtkdebug.h GTK+ Debug API
16254
eeb2bba4dc94 Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents: 15931
diff changeset
3 * @ingroup pidgin
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
6 /* pidgin
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
15572
e069b22c1fc4 headers to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
8 * Pidgin is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7035
diff changeset
10 * source distribution.
7035
76bca80cd91d [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
11 *
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * (at your option) any later version.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * GNU General Public License for more details.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16254
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
26 #ifndef _PIDGINDEBUG_H_
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
27 #define _PIDGINDEBUG_H_
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #include "debug.h"
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20147
diff changeset
31 G_BEGIN_DECLS
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20147
diff changeset
32
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 /**
5625
ac8c09def58a [gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents: 5497
diff changeset
34 * Initializes the GTK+ debug system.
ac8c09def58a [gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents: 5497
diff changeset
35 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
36 void pidgin_debug_init(void);
5625
ac8c09def58a [gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents: 5497
diff changeset
37
ac8c09def58a [gaim-migrate @ 6032]
Christian Hammond <chipx86@chipx86.com>
parents: 5497
diff changeset
38 /**
11033
dc68e074f10d [gaim-migrate @ 12919]
Etan Reisner <deryni@pidgin.im>
parents: 10814
diff changeset
39 * Uninitialized the GTK+ debug system.
dc68e074f10d [gaim-migrate @ 12919]
Etan Reisner <deryni@pidgin.im>
parents: 10814
diff changeset
40 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
41 void pidgin_debug_uninit(void);
11033
dc68e074f10d [gaim-migrate @ 12919]
Etan Reisner <deryni@pidgin.im>
parents: 10814
diff changeset
42
dc68e074f10d [gaim-migrate @ 12919]
Etan Reisner <deryni@pidgin.im>
parents: 10814
diff changeset
43 /**
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
44 * Get the handle for the GTK+ debug system.
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
45 *
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
46 * @return the handle to the debug system
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
47 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
48 void *pidgin_debug_get_handle(void);
10087
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
49
e5b80a38939d [gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9713
diff changeset
50 /**
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 * Shows the debug window.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
53 void pidgin_debug_window_show(void);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 /**
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 * Hides the debug window.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
58 void pidgin_debug_window_hide(void);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 /**
10814
7e17cb56b019 [gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents: 10087
diff changeset
61 * Returns the UI operations structure for GTK+ debug output.
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 *
10814
7e17cb56b019 [gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents: 10087
diff changeset
63 * @return The GTK+ UI debug operations structure.
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15572
diff changeset
65 PurpleDebugUiOps *pidgin_debug_get_ui_ops(void);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20147
diff changeset
67 G_END_DECLS
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20147
diff changeset
68
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
69 #endif /* _PIDGINDEBUG_H_ */

mercurial