Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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.  
  27. struct box;
  28. struct hlcache_handle;
  29.  
  30. /* text currently being saved */
  31. struct save_text_state {
  32.         char *block;
  33.         size_t length;
  34.         size_t alloc;
  35. };
  36.  
  37. typedef enum {
  38.         WHITESPACE_NONE,
  39.         WHITESPACE_TAB,
  40.         WHITESPACE_ONE_NEW_LINE,
  41.         WHITESPACE_TWO_NEW_LINES
  42. } save_text_whitespace;
  43.  
  44. void save_as_text(struct hlcache_handle *c, char *path);
  45. void 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
  50.