NetSurf
console.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 Daniel Silverstone <dsilvers@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf 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, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * Browser window console stuff
22 */
23
24#ifndef _NETSURF_CONSOLE_H_
25#define _NETSURF_CONSOLE_H_
26
27/**
28 * Sources of messages which end up in the browser window console
29 */
30typedef enum {
31 BW_CS_INPUT, /**< Input from the client */
32 BW_CS_SCRIPT_ERROR, /**< Error from some running script */
33 BW_CS_SCRIPT_CONSOLE, /**< Logging from some running script */
35
36/**
37 * Flags for browser window console logging.
38 *
39 * It is valid to bitwise-or some of these flags together where indicated.
40 */
41typedef enum {
42 /**
43 * The log entry is foldable.
44 *
45 * Set this to indicate that the text should be folded on the first
46 * newline on display. If this is set but there are no newlines in
47 * the logged text, the core will unset it before passing on to
48 * callbacks or storing the log entry.
49 */
51
52 /** Logged at the 'debug' level, please use only one of the LEVEL flags */
54 /** Logged at the 'log' level, please only use one of the LEVEL flags */
56 /** Logged at the 'info' level, please use only one of the LEVEL flags */
58 /** Logged at the 'warn' level, please use only one of the LEVEL flags */
60 /** Logged at the 'error' level, please use only one of the LEVEL flags */
62 /* Levels 5, 6, 7 unused as yet */
63 /** Mask for the error level to allow easy comparison using the above */
66
67#endif /* _NETSURF_CONSOLE_H_ */
68
browser_window_console_source
Sources of messages which end up in the browser window console.
Definition: console.h:30
@ BW_CS_SCRIPT_CONSOLE
Logging from some running script.
Definition: console.h:33
@ BW_CS_INPUT
Input from the client.
Definition: console.h:31
@ BW_CS_SCRIPT_ERROR
Error from some running script.
Definition: console.h:32
browser_window_console_flags
Flags for browser window console logging.
Definition: console.h:41
@ BW_CS_FLAG_LEVEL_LOG
Logged at the 'log' level, please only use one of the LEVEL flags.
Definition: console.h:55
@ BW_CS_FLAG_LEVEL_DEBUG
Logged at the 'debug' level, please use only one of the LEVEL flags.
Definition: console.h:53
@ BW_CS_FLAG_LEVEL_INFO
Logged at the 'info' level, please use only one of the LEVEL flags.
Definition: console.h:57
@ BW_CS_FLAG_LEVEL_MASK
Mask for the error level to allow easy comparison using the above.
Definition: console.h:64
@ BW_CS_FLAG_LEVEL_WARN
Logged at the 'warn' level, please use only one of the LEVEL flags.
Definition: console.h:59
@ BW_CS_FLAG_LEVEL_ERROR
Logged at the 'error' level, please use only one of the LEVEL flags.
Definition: console.h:61
@ BW_CS_FLAG_FOLDABLE
The log entry is foldable.
Definition: console.h:50