Subversion Repositories Kolibri OS

Rev

Rev 3584 | Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright 2011 Michael Drake <tlsa@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. /** \file
  20.  * Core types.
  21.  */
  22.  
  23. #ifndef _NETSURF_UTILS_TYPES_H_
  24. #define _NETSURF_UTILS_TYPES_H_
  25.  
  26. struct plotter_table;
  27. struct hlcache_handle;
  28.  
  29. /* Rectangle coordinates */
  30. struct rect {
  31.         int x0, y0; /* Top left */
  32.         int x1, y1; /* Bottom right */
  33. };
  34.  
  35.  
  36. /* Redraw context */
  37. struct redraw_context {
  38.         /** Redraw to show interactive features, such as active selections
  39.          *  etc.  Should be off for printing. */
  40.         bool interactive;
  41.  
  42.         /** Render background images.  May want it off for printing. */
  43.         bool background_images;
  44.  
  45.         /** Current plotters, must be assigned before use. */
  46.         const struct plotter_table *plot;
  47. };
  48.  
  49.  
  50. /* Content located at a specific spatial location */
  51. struct contextual_content {
  52.         const char *link_url;
  53.         struct hlcache_handle *object;
  54.         struct hlcache_handle *main;
  55.         enum {
  56.                 CTX_FORM_NONE,
  57.                 CTX_FORM_TEXT,
  58.                 CTX_FORM_FILE
  59.         } form_features;
  60. };
  61.  
  62. #endif
  63.