NetSurf
|
Go to the source code of this file.
Functions | |
nserror | nsgtk_viewdata (const char *title, const char *filename, char *data, size_t data_size) |
Display text to a user. More... | |
nserror | nsgtk_viewfile (const char *title, const char *leafname, const char *filename) |
Display file to a user. More... | |
nserror nsgtk_viewdata | ( | const char * | title, |
const char * | filename, | ||
char * | data, | ||
size_t | data_size | ||
) |
Display text to a user.
The data is utf-8 encoded text and will be presented in a window, a tab or an editor as per the user configuration.
title | The title of the data being displayed. |
filename | The suggested filename to be used. |
data | The data to be shown. This data will be freed once the display is complete, the caller no longer owns the allocation. |
data_size | The size of the data in data. |
Definition at line 931 of file viewdata.c.
References editor_init(), nsgtk_viewdata_ctx::filename, NSERROR_BAD_PARAMETER, NSERROR_OK, nsoption_int, tab_init(), and window_init().
Referenced by nsgtk_viewsource().
nserror nsgtk_viewfile | ( | const char * | title, |
const char * | leafname, | ||
const char * | filename | ||
) |
Display file to a user.
The file is interpreted as utf-8 encoded text and will be presented in a window, a tab or an editor as per the user configuration.
title | The title of the data being displayed. |
leafname | The suggested leafname to be used. |
filename | The filename of the data to be viewed. |
Definition at line 966 of file viewdata.c.
References editor_init_fname(), nsgtk_viewdata_ctx::filename, NSERROR_BAD_PARAMETER, nsoption_int, tab_init_fname(), and window_init_fname().
Referenced by debugboxtree_button_clicked_cb(), and debugdomtree_button_clicked_cb().