comparison src/debug.h @ 11033:50224ac8184d

[gaim-migrate @ 12919] Ok, this is debug window filtering. Sadrul was going to do this with a text entry, but I like this better, feel free to disagree with me. It's not the prettiest in a couple places, most notable gtkmain.c where a bunch of categories that don't currently have a home get registered. I added some plugin_(un)load functions to some plugins to place the (un)register functions. Though I didn't do that for the prpls. Comments and cleanups welcome. (Oh, I've been seeing some crashes on quit, but I haven't been able to get it to happen reliably so I'm not sure if it's my code or some transient HEAD oscar/other crash.) committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 28 Jun 2005 06:13:07 +0000
parents 2ac21bf20e04
children bb0d7b719af2
comparison
equal deleted inserted replaced
11032:31c1c48daba1 11033:50224ac8184d
47 */ 47 */
48 typedef struct 48 typedef struct
49 { 49 {
50 void (*print)(GaimDebugLevel level, const char *category, 50 void (*print)(GaimDebugLevel level, const char *category,
51 const char *format, va_list args); 51 const char *format, va_list args);
52 52 void (*register_category)(const char *category);
53 void (*unregister_category)(const char *category);
53 } GaimDebugUiOps; 54 } GaimDebugUiOps;
54 55
55 #ifdef __cplusplus 56 #ifdef __cplusplus
56 extern "C" { 57 extern "C" {
57 #endif 58 #endif
148 * @see gaim_debug() 149 * @see gaim_debug()
149 */ 150 */
150 void gaim_debug_fatal(const char *category, const char *format, ...); 151 void gaim_debug_fatal(const char *category, const char *format, ...);
151 152
152 /** 153 /**
154 * Registers a debug category so that it can be filtered on.
155 *
156 * @param category The category to register.
157 */
158 void gaim_debug_register_category(const char *category);
159
160 /**
161 * Remove a registered category.
162 *
163 * @param category The category to unregister.
164 */
165 void gaim_debug_unregister_category(const char *category);
166
167 /**
153 * Enable or disable printing debug output to the console. 168 * Enable or disable printing debug output to the console.
154 * 169 *
155 * @param enabled TRUE to enable debug output or FALSE to disable it. 170 * @param enabled TRUE to enable debug output or FALSE to disable it.
156 */ 171 */
157 void gaim_debug_set_enabled(gboolean enabled); 172 void gaim_debug_set_enabled(gboolean enabled);