mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-17 12:32:53 +03:00
Add console_log to gui tables
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
d27027d4ba
commit
d240174741
@ -139,6 +139,15 @@ static void gui_default_window_start_selection(struct gui_window *g)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gui_default_console_log(struct gui_window *gw,
|
||||
browser_window_console_source src,
|
||||
const char *msg,
|
||||
size_t msglen,
|
||||
browser_window_console_flags flags)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/** verify window table is valid */
|
||||
static nserror verify_window_register(struct gui_window_table *gwt)
|
||||
@ -228,6 +237,9 @@ static nserror verify_window_register(struct gui_window_table *gwt)
|
||||
if (gwt->start_selection == NULL) {
|
||||
gwt->start_selection = gui_default_window_start_selection;
|
||||
}
|
||||
if (gwt->console_log == NULL) {
|
||||
gwt->console_log = gui_default_console_log;
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#ifndef NETSURF_WINDOW_H
|
||||
#define NETSURF_WINDOW_H
|
||||
|
||||
#include "netsurf/console.h"
|
||||
|
||||
typedef enum gui_save_type {
|
||||
GUI_SAVE_SOURCE,
|
||||
GUI_SAVE_DRAW,
|
||||
@ -341,6 +343,23 @@ struct gui_window_table {
|
||||
* \param gw The gui window to start selection in.
|
||||
*/
|
||||
void (*start_selection)(struct gui_window *gw);
|
||||
|
||||
/**
|
||||
* console logging happening.
|
||||
*
|
||||
* See \ref browser_window_console_log
|
||||
*
|
||||
* \param gw The gui window receiving the logging.
|
||||
* \param src The source of the logging message
|
||||
* \param msg The text of the logging message
|
||||
* \param msglen The length of the text of the logging message
|
||||
* \param flags Flags associated with the logging.
|
||||
*/
|
||||
void (*console_log)(struct gui_window *gw,
|
||||
browser_window_console_source src,
|
||||
const char *msg,
|
||||
size_t msglen,
|
||||
browser_window_console_flags flags);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user