NetSurf
save_text.h
Go to the documentation of this file.
1/*
2 * Copyright 2004 John M Bell <jmb202@ecs.soton.ac.uk>
3 * Copyright 2008 Michael Drake <tlsa@netsurf-browser.org>
4 *
5 * This file is part of NetSurf, http://www.netsurf-browser.org/
6 *
7 * NetSurf is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * NetSurf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20/** \file
21 * Text export of HTML (interface).
22 */
23
24#ifndef _NETSURF_DESKTOP_SAVE_TEXT_H_
25#define _NETSURF_DESKTOP_SAVE_TEXT_H_
26
27struct box;
28struct hlcache_handle;
29
30/* text currently being saved */
32 char *block;
33 size_t length;
34 size_t alloc;
35};
36
37typedef enum {
43
44void save_as_text(struct hlcache_handle *c, char *path);
45void save_text_solve_whitespace(struct box *box, bool *first,
46 save_text_whitespace *before, const char **whitespace_text,
47 size_t *whitespace_length);
48
49#endif
void save_as_text(struct hlcache_handle *c, char *path)
Extract the text from an HTML content and save it as a text file.
Definition: save_text.c:57
void save_text_solve_whitespace(struct box *box, bool *first, save_text_whitespace *before, const char **whitespace_text, size_t *whitespace_length)
Decide what whitespace to place before the next bit of content-related text that is saved.
Definition: save_text.c:125
save_text_whitespace
Definition: save_text.h:37
@ WHITESPACE_TWO_NEW_LINES
Definition: save_text.h:41
@ WHITESPACE_ONE_NEW_LINE
Definition: save_text.h:40
@ WHITESPACE_NONE
Definition: save_text.h:38
@ WHITESPACE_TAB
Definition: save_text.h:39
Node in box tree.
Definition: box.h:177
High-level cache handle.
Definition: hlcache.c:66
size_t length
Definition: save_text.h:33
char * block
Definition: save_text.h:32
size_t alloc
Definition: save_text.h:34
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
Definition: plot.c:821